GNOME Bugzilla – Bug 525807
[vorbisenc] vorbisenc has problems with a gnlsource that isn't starting from the beginning
Last modified: 2008-10-08 12:07:53 UTC
Setup: a gnlsource with a silence audiotestsrc (start: 0 second, duration: 1 second) a gnlfilesource with a wav (start: 1 second, duration: 4 seconds) add those to a gnlcomposition and feed it to a vorbisenc and oggmux. Output: 0:00:00.343750000 3688 02511900 WARN default :0::<enc> Buffer is older than previous timestamp + duration (0:00:00.000000000< 0:00:01.000000000), cannot handle. Dropping buffer. 0:00:00.390625000 3688 02511900 WARN default :0::<enc> Buffer is older than previous timestamp + duration (0:00:00.370793650< 0:00:01.000000000), cannot handle. Dropping buffer. 0:00:00.421875000 3688 02511900 WARN default :0::<enc> Buffer is older than previous timestamp + duration (0:00:00.742312925< 0:00:01.000000000), cannot handle. Dropping buffer. 0:00:00.468750000 3688 02511900 WARN default :0::<enc> Buffer is discontinuous, flushing encoder and restarting (Discont from 0:00:00.41859410 to 0:00:01.113832199)
Created attachment 108484 [details] source to reproduce
Created attachment 108486 [details] [review] suggested patch
Created attachment 108551 [details] [review] updated suggested patch
Created attachment 108561 [details] [review] updated suggested patch with adjusted granulepos
This patch probably will have problems with variant bitrates
Thanks, this is committed now with quite some changes... 2008-10-08 Sebastian Dröge <sebastian.droege@collabora.co.uk> Based on a patch by: Klaas <klaas at rivercrew dot net> * ext/vorbis/vorbisenc.c: (gst_vorbis_enc_sink_event), (gst_vorbis_enc_buffer_check_discontinuous), (gst_vorbis_enc_chain), (gst_vorbis_enc_change_state): * ext/vorbis/vorbisenc.h: Keep track of the upstream segments and use the running time on that segment instead of the buffer timestamp everywhere. Fixes bug #525807.