From 1e4cdc6d6f9d2554aadd5bc1f22c1c23899b7ac2 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 3 Apr 2017 11:34:49 +0200 Subject: [PATCH] qtdemux: Update variables before early exit This is an update of d78d5896272d78df41e696fac929e7dfb3bb3dfa 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. --- gst/isomp4/qtdemux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index f8f08cd329..90ed6a8b62 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -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: