mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-05-14 12:18:57 +00:00
qtdemux: Properly reset demuxer when all streams are EOS
Make sure offset and neededbytes are properly resetted when all streams are EOS in push-mode. Avoids cases when some data might still be pushed by upstream (because it didn't yet see the resulting GST_FLOW_EOS yet) and qtdemux gets completely lost. https://bugzilla.gnome.org/show_bug.cgi?id=781266
This commit is contained in:
parent
8586150aec
commit
c6e9c67f63
1 changed files with 8 additions and 5 deletions
|
@ -6885,6 +6885,7 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
|
|||
|
||||
/* skip this data, stream is EOS */
|
||||
gst_adapter_flush (demux->adapter, demux->neededbytes);
|
||||
demux->offset += demux->neededbytes;
|
||||
|
||||
/* check if all streams are eos */
|
||||
ret = GST_FLOW_EOS;
|
||||
|
@ -6894,11 +6895,6 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == GST_FLOW_EOS) {
|
||||
GST_DEBUG_OBJECT (demux, "All streams are EOS, signal upstream");
|
||||
goto eos;
|
||||
}
|
||||
} else {
|
||||
GstBuffer *outbuf;
|
||||
|
||||
|
@ -6929,6 +6925,13 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
|
|||
GST_LOG_OBJECT (demux, "offset is now %" G_GUINT64_FORMAT,
|
||||
demux->offset);
|
||||
|
||||
|
||||
if (ret == GST_FLOW_EOS) {
|
||||
GST_DEBUG_OBJECT (demux, "All streams are EOS, signal upstream");
|
||||
demux->neededbytes = -1;
|
||||
goto eos;
|
||||
}
|
||||
|
||||
if ((demux->neededbytes = next_entry_size (demux)) == -1) {
|
||||
if (demux->fragmented) {
|
||||
GST_DEBUG_OBJECT (demux, "(temporarily) out of fragmented samples");
|
||||
|
|
Loading…
Reference in a new issue