+2005-11-11 Michael Smith <msmith@fluendo.com>
+
+ * ext/vorbis/vorbisenc.c: (gst_vorbisenc_setup),
+ (gst_vorbisenc_buffer_from_packet):
+ * ext/vorbis/vorbisenc.h:
+ Set duration on encoded buffers. This allows oggmux's
+ max_page_delay parameter to actually work.
+
2005-11-11 Tim-Philipp Müller <tim at centricular dot net>
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:
vorbis_analysis_init (&vorbisenc->vd, &vorbisenc->vi);
vorbis_block_init (&vorbisenc->vd, &vorbisenc->vb);
+ vorbisenc->prev_ts = 0;
+
vorbisenc->setup = TRUE;
return TRUE;
GST_BUFFER_TIMESTAMP (outbuf) =
vorbis_granule_time_copy (&vorbisenc->vd,
packet->granulepos) * GST_SECOND;
+ GST_BUFFER_DURATION (outbuf) =
+ GST_BUFFER_TIMESTAMP (outbuf) - vorbisenc->prev_ts;
+ vorbisenc->prev_ts = GST_BUFFER_TIMESTAMP (outbuf);
GST_DEBUG ("encoded buffer of %d bytes", GST_BUFFER_SIZE (outbuf));
return outbuf;