rtspsrc: fix seeking regression
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 12 Jul 2011 13:04:38 +0000 (15:04 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 12 Jul 2011 13:13:25 +0000 (15:13 +0200)
... introduced when shuffling around code for the async implementation
by setting state of source (and udp sources) in _play before downstream
flushing is undone.

gst/rtsp/gstrtspsrc.c

index 78b968f..13f23b3 100644 (file)
@@ -6018,8 +6018,12 @@ gst_rtspsrc_play (GstRTSPSrc * src, GstSegment * segment, gboolean async)
    * udp sources */
   gst_rtspsrc_send_dummy_packets (src);
 
-  /* activate receive elements */
-  gst_element_set_state (GST_ELEMENT_CAST (src), GST_STATE_PLAYING);
+  /* activate receive elements;
+   * only in async case, since receive elements may not have been affected
+   * by overall state change (e.g. not around yet),
+   * do not mess with state in sync case (e.g. seeking) */
+  if (async)
+    gst_element_set_state (GST_ELEMENT_CAST (src), GST_STATE_PLAYING);
 
   /* construct a control url */
   if (src->control)