qtdemux: don't send EOS twice on the same pad.
authorAlessandro Decina <alessandro.decina@collabora.co.uk>
Tue, 14 Sep 2010 15:41:28 +0000 (17:41 +0200)
committerAlessandro Decina <alessandro.decina@collabora.co.uk>
Tue, 14 Sep 2010 15:43:33 +0000 (17:43 +0200)
gst/qtdemux/qtdemux.c

index 4faab5f..1c091bd 100644 (file)
@@ -716,8 +716,11 @@ gst_qtdemux_push_event (GstQTDemux * qtdemux, GstEvent * event)
 
   for (n = 0; n < qtdemux->n_streams; n++) {
     GstPad *pad;
+    QtDemuxStream *stream = qtdemux->streams[n];
 
-    if ((pad = qtdemux->streams[n]->pad)) {
+    if (etype == GST_EVENT_EOS && stream->sent_eos)
+      pushed_sucessfully = TRUE;
+    else if ((pad = stream->pad)) {
       if (gst_pad_push_event (pad, gst_event_ref (event)))
         pushed_sucessfully = TRUE;
     }