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 326598 - [mpegstream] does not handle timestamp overflow correctly
[mpegstream] does not handle timestamp overflow correctly
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal normal
: 0.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-11 13:33 UTC by Michal Benes
Modified: 2006-03-23 18:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix timestamp overflow (2.72 KB, patch)
2006-01-11 13:36 UTC, Michal Benes
none Details | Review
Patch to fix timestamp overflow (3.06 KB, patch)
2006-01-19 16:44 UTC, Michal Benes
accepted-commit_after_freeze Details | Review

Description Michal Benes 2006-01-11 13:33:53 UTC
Timestamps in mpeg stream are 32-bit numbers. Therefore, with clock_freq 90kHz this timestamp overflows every ~13 hours. This situation really happens when grabbing DVB streams. Current mpegdemuxer can not handle this situation correctly and it restart counting gstramer timestamps from zero.
Comment 1 Michal Benes 2006-01-11 13:36:28 UTC
Created attachment 57154 [details] [review]
Patch to fix timestamp overflow

This simple patch makes gstreamer timestamp continue correctly even when mpeg timestamp overflows.
Comment 2 Tim-Philipp Müller 2006-01-19 15:25:24 UTC
Looks good to me; CC'ing Martin Soto
Comment 3 Michal Benes 2006-01-19 16:44:42 UTC
Created attachment 57656 [details] [review]
Patch to fix timestamp overflow

I have almost forgot to send a new version of the patch. Checking for monotonous timestamp incremets did not worked. This patch check for small increments in absolute value.
Comment 4 Jan Schmidt 2006-02-17 19:12:58 UTC
Forgot about this patch. Since I've frozen gst-plugins-ugly today and it's not immediately obvious to me that this patch is trivially correct, I'd prefer to leave it until I release and then apply it immediately, so that we test it for a while before the next gst-plugins-ugly release.
Comment 5 Tim-Philipp Müller 2006-03-03 12:41:47 UTC
Ping? What about this patch?

Michal, is that the latest revision that you guys are using or is there a newer one?
Comment 6 Michal Benes 2006-03-03 13:01:06 UTC
Yes, this is the latest version of the patch, one month ago, we were able to receive a DVB stream for several days without interruption using this patch. But I have not tried to apply this patch to the recent CVS version.
Comment 7 Wim Taymans 2006-03-23 18:17:43 UTC
patch seems ok. seeking in mpeg still completely wrong, though. 

        Patch by: Michal Benes <michal dot benes at xeris dot cz>

        * gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_init),
        (gst_mpeg_demux_parse_packet), (gst_mpeg_demux_parse_pes),
        (gst_mpeg_demux_send_subbuffer), (gst_mpeg_demux_reset):
        * gst/mpegstream/gstmpegdemux.h:
        * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_parse_packhead):
        Timestamps in mpeg stream are 32-bit numbers. Therefore, with a
        clock_freq of 90kHz this timestamp overflows every ~13 hours. This
        situation really happens when grabbing DVB streams. Current
        mpegdemuxer can not handle this situation correctly and it
        restarts counting gstreamer timestamps from zero.
        Fixes #326598.