qtdemux: Update variables before early exit

This is an update of d78d589627

We still exit as early as possible in case of non-ok/non-unlinked combined
flow, but we first make sure that we update the internal position variables.

This ensures that if upstreams "ignores" the flow return (and carries on pushing),
we don't end up processing data with completely bogus variables/positions.
This commit is contained in:
Edward Hervey 2017-04-03 11:34:49 +02:00 committed by Edward Hervey
parent a9f26c2a14
commit 1e4cdc6d6f

View file

@ -6871,8 +6871,6 @@ 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);
@ -6898,6 +6896,9 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
}
goto eos;
}
if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED) {
goto non_ok_unlinked_flow;
}
break;
}
default: