mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
matroskademux: ensure no-more-pads is always emitted
In particular, do so even if failing to read while prerolling, such as when reading from a partial file (eg, while it is being downloaded). This fixes a wedge in playbin2. https://bugzilla.gnome.org/show_bug.cgi?id=651965
This commit is contained in:
parent
3e0134f51f
commit
e032d26674
1 changed files with 14 additions and 0 deletions
|
@ -4340,6 +4340,20 @@ pause:
|
||||||
if (ret == GST_FLOW_UNEXPECTED) {
|
if (ret == GST_FLOW_UNEXPECTED) {
|
||||||
/* perform EOS logic */
|
/* perform EOS logic */
|
||||||
|
|
||||||
|
/* If we were in the headers, make sure we send no-more-pads.
|
||||||
|
This will ensure decodebin2 does not get stuck thinking
|
||||||
|
the chain is not complete yet, and waiting indefinitely. */
|
||||||
|
if (G_UNLIKELY (demux->common.state == GST_MATROSKA_READ_STATE_HEADER)) {
|
||||||
|
if (demux->common.src->len == 0) {
|
||||||
|
GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL),
|
||||||
|
("No pads created"));
|
||||||
|
} else {
|
||||||
|
GST_ELEMENT_WARNING (demux, STREAM, DEMUX, (NULL),
|
||||||
|
("Failed to finish reading headers"));
|
||||||
|
}
|
||||||
|
gst_element_no_more_pads (GST_ELEMENT (demux));
|
||||||
|
}
|
||||||
|
|
||||||
/* Close the segment, i.e. update segment stop with the duration
|
/* Close the segment, i.e. update segment stop with the duration
|
||||||
* if no stop was set */
|
* if no stop was set */
|
||||||
if (GST_CLOCK_TIME_IS_VALID (demux->last_stop_end) &&
|
if (GST_CLOCK_TIME_IS_VALID (demux->last_stop_end) &&
|
||||||
|
|
Loading…
Reference in a new issue