rtspsrc: mark discont on the streams as was said the debug line
authorJosep Torra <n770galaxy@gmail.com>
Sat, 18 Apr 2009 12:32:40 +0000 (14:32 +0200)
committerJosep Torra <n770galaxy@gmail.com>
Sat, 18 Apr 2009 12:32:40 +0000 (14:32 +0200)
After a seek mark all streams with discont as it was said in the debug line.
Fixes that buffers after a seek are generated without a valid timestamp.

gst/rtsp/gstrtspsrc.c

index f23ed54..eaf6ef9 100644 (file)
@@ -1386,6 +1386,7 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
   gboolean update;
   gboolean playing;
   GstSegment seeksegment = { 0, };
+  GList *walk;
 
   if (event) {
     GST_DEBUG_OBJECT (src, "doing seek with event");
@@ -1509,6 +1510,10 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
 
   /* mark discont */
   GST_DEBUG_OBJECT (src, "mark DISCONT, we did a seek to another position");
+  for (walk = src->streams; walk; walk = g_list_next (walk)) {
+    GstRTSPStream *stream = (GstRTSPStream *) walk->data;
+    stream->discont = TRUE;
+  }
 
   GST_RTSP_STREAM_UNLOCK (src);