After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 334083 - [jpegdec] wrong durations set on buffers after seeking in MJPEG files
[jpegdec] wrong durations set on buffers after seeking in MJPEG files
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.2
Other Linux
: Normal normal
: 0.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-10 01:22 UTC by Michael Dominic K.
Modified: 2006-03-14 09:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Dominic K. 2006-03-10 01:22:54 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.
Comment 1 Tim-Philipp Müller 2006-03-14 09:24:40 UTC
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.