mpegtsbase: Add condition to check for non working negative rate
authorVineeth TM <vineeth.tm@samsung.com>
Thu, 24 Dec 2015 06:10:16 +0000 (15:10 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 17 Feb 2016 08:51:07 +0000 (10:51 +0200)
tsdemux is not able to handle negative playback rates.
But in mpegtsbase, the same check is not being done.
added a check to not handle negative rate while seeking unless
the same is handled upstream.

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

gst/mpegtsdemux/mpegtsbase.c

index 3dcde60..1265669 100644 (file)
@@ -1438,6 +1438,11 @@ mpegts_base_handle_seek_event (MpegTSBase * base, GstPad * pad,
     return ret == GST_FLOW_OK;
   }
 
+  if (rate <= 0.0) {
+    GST_WARNING ("Negative rate not supported");
+    return FALSE;
+  }
+
   GST_DEBUG ("seek event, rate: %f start: %" GST_TIME_FORMAT
       " stop: %" GST_TIME_FORMAT, rate, GST_TIME_ARGS (start),
       GST_TIME_ARGS (stop));