summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2015-12-07 16:33:14 +0100
committerEdward Hervey <bilboed@bilboed.com>2015-12-07 16:36:15 +0100
commitd78d5896272d78df41e696fac929e7dfb3bb3dfa (patch)
tree8313a990fbcc2964169a5906eb2634061651e1a5
parent8a7eaeb2372f544964f5ce350ceb2a8166670eb5 (diff)
qtdemux: Stop pushing data as soon as possible in push-modeqtpushfix
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
-rw-r--r--gst/isomp4/qtdemux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 31aba9d0f..378982d9f 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -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 */
+non_ok_unlinked_flow:
+ {
+ GST_DEBUG_OBJECT (demux, "Stopping, combined return flow %s",
+ gst_flow_get_name (ret));
+ return ret;
+ }
unknown_stream:
{
GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL), ("unknown stream found"));