mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-25 01:54:17 +00:00
uridecodebin3: propagate about-to-finish for new inputs
If the pending next urisourcebin is already draining, make sure we propagate it when activating it. Fixes gapless playback of small entries Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1588 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3457>
This commit is contained in:
parent
def2515ae2
commit
3a63eab2fa
1 changed files with 8 additions and 0 deletions
|
@ -1113,9 +1113,17 @@ switch_and_activate_input_locked (GstURIDecodeBin3 * uridecodebin,
|
||||||
/* and set new one as input item */
|
/* and set new one as input item */
|
||||||
uridecodebin->input_item = new_item;
|
uridecodebin->input_item = new_item;
|
||||||
|
|
||||||
|
/* If the new source is already drained, propagate about-to-finish */
|
||||||
|
if (new_item->pending_about_to_finish) {
|
||||||
|
emit_and_handle_about_to_finish (uridecodebin, new_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Finally propagate pending buffering message */
|
||||||
if (new_item->main_item->handler->pending_buffering_msg) {
|
if (new_item->main_item->handler->pending_buffering_msg) {
|
||||||
GstMessage *msg = new_item->main_item->handler->pending_buffering_msg;
|
GstMessage *msg = new_item->main_item->handler->pending_buffering_msg;
|
||||||
new_item->main_item->handler->pending_buffering_msg = NULL;
|
new_item->main_item->handler->pending_buffering_msg = NULL;
|
||||||
|
GST_DEBUG_OBJECT (uridecodebin,
|
||||||
|
"Posting pending buffering message %" GST_PTR_FORMAT, msg);
|
||||||
PLAY_ITEMS_UNLOCK (uridecodebin);
|
PLAY_ITEMS_UNLOCK (uridecodebin);
|
||||||
GST_BIN_CLASS (parent_class)->handle_message ((GstBin *) uridecodebin, msg);
|
GST_BIN_CLASS (parent_class)->handle_message ((GstBin *) uridecodebin, msg);
|
||||||
PLAY_ITEMS_LOCK (uridecodebin);
|
PLAY_ITEMS_LOCK (uridecodebin);
|
||||||
|
|
Loading…
Reference in a new issue