Commit d78d5896 authored by Edward Hervey's avatar Edward Hervey Committed by Edward Hervey

qtdemux: Stop pushing data as soon as possible in push-mode

When working in push-mode, we attempt to push out everything currently
buffered in the adapter.

This has two pitfalls:
* We could stop earlier (the moment we get a non-ok or non-not-linked)
* We return the last combined flow return, which might be completely
  different from the previous combined flow return
parent 8a7eaeb2
......@@ -6112,6 +6112,8 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
/* combine flows */
ret = gst_qtdemux_combine_flows (demux, stream, ret);
if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED)
goto non_ok_unlinked_flow;
} else {
/* skip this data, stream is EOS */
gst_adapter_flush (demux->adapter, demux->neededbytes);
......@@ -6155,6 +6157,12 @@ done:
return ret;
/* ERRORS */
GST_DEBUG_OBJECT (demux, "Stopping, combined return flow %s",
gst_flow_get_name (ret));
return ret;
GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL), ("unknown stream found"));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment