GNOME Bugzilla – Bug 334083
[jpegdec] wrong durations set on buffers after seeking in MJPEG files
Last modified: 2006-03-14 09:24:40 UTC
There is something wrong with the GST_BUFFER_DURATION of the buffers generated by jpegdec. It seems to boil down to: gstjpegdec.c , line 823+ ... GST_BUFFER_TIMESTAMP (outbuf) = dec->next_ts; if (dec->packetized && dec->framerate_numerator != 0) { GstClockTime next_ts; dec->frames_decoded++; next_ts = dec->frames_decoded * GST_SECOND * dec->framerate_denominator / dec->framerate_numerator; duration = next_ts - dec->next_ts; dec->next_ts = next_ts; } else { duration = GST_CLOCK_TIME_NONE; dec->next_ts = GST_CLOCK_TIME_NONE; } GST_BUFFER_DURATION (outbuf) = duration; ... Basically 'next_ts - dec->next_ts' is sometimes negative. I bumped on that with MJPEG AVI's after seek. Reported on irc too.
Should be fixed in CVS now, please re-open if you still have problems with it: 2006-03-14 Tim-Philipp Müller <tim at centricular dot net> * ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_class_init), (gst_jpeg_dec_chain), (gst_jpeg_dec_change_state): * ext/jpeg/gstjpegdec.h: Fix durations on outgoing buffers after seeking in MJPEG files (#334083); some minor clean-ups.