asfdemux: slightly relax supported seek requirements
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 20 Jul 2012 12:41:57 +0000 (14:41 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 20 Jul 2012 12:53:05 +0000 (14:53 +0200)
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680279

gst/asfdemux/gstasfdemux.c

index adf894c..86f1720 100644 (file)
@@ -644,8 +644,9 @@ gst_asf_demux_handle_seek_event (GstASFDemux * demux, GstEvent * event)
       return FALSE;
     }
     /* we can (re)construct the start later on, but not the end */
-    if (stop_type != GST_SEEK_TYPE_NONE) {
-      GST_LOG_OBJECT (demux, "streaming; end type must be NONE");
+    if (stop_type != GST_SEEK_TYPE_NONE &&
+        (stop_type != GST_SEEK_TYPE_SET || GST_CLOCK_TIME_IS_VALID (stop))) {
+      GST_LOG_OBJECT (demux, "streaming; end position must be NONE");
       return FALSE;
     }
     gst_event_ref (event);