element: Reset the stop position to NONE in seek_simple()
authorSebastian Dröge <sebastian@centricular.com>
Fri, 9 Sep 2016 08:46:11 +0000 (11:46 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 10 Sep 2016 07:58:44 +0000 (10:58 +0300)
When using seek_simple() in combination with other kinds of seeks, this
becomes problematic. seek_simple() does not reset the stop position to
GST_CLOCK_TIME_NONE but keeps whatever a previous seek did. So for example
when doing a seek_simple() after a rate=-1 seek, we would usually get
assertions that start>stop (and stop being the old stop from the rate=1 seek).

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

gst/gstutils.c

index b318684..e1265a0 100644 (file)
@@ -2415,7 +2415,7 @@ gst_element_seek_simple (GstElement * element, GstFormat format,
   g_return_val_if_fail (seek_pos >= 0, FALSE);
 
   return gst_element_seek (element, 1.0, format, seek_flags,
-      GST_SEEK_TYPE_SET, seek_pos, GST_SEEK_TYPE_NONE, 0);
+      GST_SEEK_TYPE_SET, seek_pos, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE);
 }
 
 /**