mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
decodebin3: Dispose decoder in case linking failed
Otherwise it will be leaked and remain forever in the bin when trying the next decoder candidate. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5551>
This commit is contained in:
parent
d448639b6d
commit
677b6f7148
1 changed files with 4 additions and 1 deletions
|
@ -2831,7 +2831,9 @@ remove_decoder_link (DecodebinOutputStream * output, MultiQueueSlot * slot)
|
|||
{
|
||||
GstDecodebin3 *dbin = output->dbin;
|
||||
|
||||
if (gst_pad_is_linked (output->decoder_sink)) {
|
||||
gst_pad_unlink (slot->src_pad, output->decoder_sink);
|
||||
}
|
||||
if (output->drop_probe_id) {
|
||||
gst_pad_remove_probe (slot->src_pad, output->drop_probe_id);
|
||||
output->drop_probe_id = 0;
|
||||
|
@ -2979,6 +2981,7 @@ reconfigure_output_stream (DecodebinOutputStream * output,
|
|||
GST_PAD_LINK_CHECK_NOTHING) != GST_PAD_LINK_OK) {
|
||||
GST_WARNING_OBJECT (dbin, "could not link to %s:%s",
|
||||
GST_DEBUG_PAD_NAME (output->decoder_sink));
|
||||
decoder_failed = TRUE;
|
||||
goto try_next;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue