Revert "media: only flush when setting a new start position"
authorWim Taymans <wtaymans@redhat.com>
Tue, 18 Feb 2014 15:58:45 +0000 (16:58 +0100)
committerWim Taymans <wtaymans@redhat.com>
Tue, 18 Feb 2014 15:58:45 +0000 (16:58 +0100)
This reverts commit f67fc23aab59f28796bebf130504ff46ccb97b0a.

We need to do the flush in all cases, demuxer block currently for
non-flushing seeks.

gst/rtsp-server/rtsp-media.c

index ede357e..033e973 100644 (file)
@@ -1548,14 +1548,14 @@ gst_rtsp_media_seek (GstRTSPMedia * media, GstRTSPTimeRange * range)
     if (priv->blocked)
       media_streams_set_blocked (media, TRUE);
 
-    flags = GST_SEEK_FLAG_NONE;
+    /* depends on the current playing state of the pipeline. We might need to
+     * queue this until we get EOS. */
+    flags = GST_SEEK_FLAG_FLUSH;
 
-    /* only set flush and keyframe flag when modifying start */
+    /* only set keyframe flag when modifying start */
     if (start_type != GST_SEEK_TYPE_NONE)
-      flags = GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT;
+      flags |= GST_SEEK_FLAG_KEY_UNIT;
 
-    /* depends on the current playing state of the pipeline. We might need to
-     * queue this until we get EOS. */
     /* FIXME, we only do forwards */
     res = gst_element_seek (priv->pipeline, 1.0, GST_FORMAT_TIME,
         flags, start_type, start, stop_type, stop);