mpegdemux: don't do bogus adjustments on seek if we have no first_pts
authorTim-Philipp Müller <tim@centricular.com>
Fri, 13 May 2016 12:27:37 +0000 (13:27 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 15 May 2016 09:18:11 +0000 (10:18 +0100)
Fixes bogus segment and gap events with start=GST_CLOCK_TIME_NONE if
we failed to find a first_pts.

https://bugzilla.gnome.org/show_bug.cgi?id=623860

gst/mpegdemux/gstmpegdemux.c

index 05a1a32..5d7507b 100644 (file)
@@ -1274,7 +1274,7 @@ gst_ps_demux_handle_seek_pull (GstPsDemux * demux, GstEvent * event)
   }
 
   /* check the limits */
-  if (seeksegment.rate > 0.0) {
+  if (seeksegment.rate > 0.0 && first_pts != G_MAXUINT64) {
     if (seeksegment.start < first_pts - demux->base_time) {
       seeksegment.start = first_pts - demux->base_time;
       seeksegment.position = seeksegment.start;