qtdemux: Don't switch active streams and old streams ...
authorSeungha Yang <seungha.yang@navercorp.com>
Sun, 7 Oct 2018 11:07:39 +0000 (20:07 +0900)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 19 Oct 2018 12:44:43 +0000 (14:44 +0200)
... before the old streams is not exposed yet for MSS stream.

In case of DASH, newly configured streams will be exposed
whenever demux got moov without delay.
Meanwhile, since there is no moov box in MSS stream,
the caps will act like moov. Then, there is delay for exposing new pads
until demux got the first moof.

So, following scenario is possible only for MSS but not for DASH,
STREAM-START -> CAPS -> (configure stream but NOT EXPOSED YET)
-> STREAM-START-> CAPS (configure stream again).

In above scenario, we can reuse old stream without any stream reconfigure.

https://bugzilla.gnome.org/show_bug.cgi?id=797239

gst/isomp4/qtdemux.c

index c99546e..dadf354 100644 (file)
@@ -2488,8 +2488,10 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent,
       gst_qtdemux_process_adapter (demux, TRUE);
       gst_qtdemux_reset (demux, FALSE);
       /* We expect new moov box after new stream-start event */
-      gst_qtdemux_stream_concat (demux,
-          demux->old_streams, demux->active_streams);
+      if (demux->exposed) {
+        gst_qtdemux_stream_concat (demux,
+            demux->old_streams, demux->active_streams);
+      }
 
       goto drop;
     }