avidemux: ignore streams that finished
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 26 Jan 2010 10:18:28 +0000 (11:18 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 26 Jan 2010 10:22:56 +0000 (11:22 +0100)
When we receive an UNEXPECTED from a stream, move to the next stream and only go
EOS when all streams are EOS. When selecting a stream to push, ignore streams
that went EOS.

Fixes #607949

gst/avi/gstavidemux.c

index 6c47513..ac69143 100644 (file)
@@ -4205,6 +4205,11 @@ gst_avi_demux_find_next (GstAviDemux * avi, gfloat rate)
     GstAviStream *stream;
 
     stream = &avi->stream[i];
+
+    /* ignore streams that finished */
+    if (stream->last_flow == GST_FLOW_UNEXPECTED)
+      continue;
+
     position = stream->current_timestamp;
 
     /* position of -1 is EOS */
@@ -4369,7 +4374,8 @@ eos_stop:
         " setting EOS (%" GST_TIME_FORMAT " > %" GST_TIME_FORMAT ")",
         GST_TIME_ARGS (timestamp), GST_TIME_ARGS (avi->segment.stop));
     ret = GST_FLOW_UNEXPECTED;
-    goto beach;
+    /* move to next stream */
+    goto next;
   }
 pull_failed:
   {