From 2099a3945957fa0ddf10cd8b2ddef0e54f86bcdf Mon Sep 17 00:00:00 2001 From: Alexey Fisher Date: Tue, 29 Nov 2011 12:20:51 +0100 Subject: [PATCH] mpegpsdemux: recalculate adjust if difference is negative One of my dvds jump on some position and miss about 1 minute of stream. The reason was mpeg timestamps. On some position scr difference is negative. It produced negative timestamps. Since it was converted to unsigned value, gstreamer timestamps was invalid. Instead of increasing mpeg ts, they was decreasing till it started to be positive. The jump in timestamps caused mpeg2dec to skip frames to make QoS happy. This patch just make diff unsigned to avoid negative values. Signed-off-by: Alexey Fisher https://bugzilla.gnome.org/show_bug.cgi?id=656115 --- gst/mpegdemux/gstmpegdemux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index a73f8f95f2..55a567eb03 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -1607,7 +1607,7 @@ gst_flups_demux_parse_pack_start (GstFluPSDemux * demux) /* adjustment of the SCR */ if (G_LIKELY (demux->current_scr != G_MAXUINT64)) { - gint64 diff; + guint64 diff; guint64 old_scr, old_mux_rate, bss, adjust = 0; /* keep SCR of the previous packet */