Commit cbd4bcd7 authored by Seungha Yang's avatar Seungha Yang Committed by Edward Hervey

urisourcebin: Try to link output slot before cleanup

Before cleaning up output slot, check pending pads first, if available.
Then, cleanup it only if linking was failed.
parent 5760bd45
......@@ -1343,7 +1343,13 @@ pad_removed_cb (GstElement * element, GstPad * pad, GstURISourceBin * urisrc)
if (GST_PAD_IS_EOS (info->output_slot->sinkpad)) {
GST_LOG_OBJECT (element,
"Pad %" GST_PTR_FORMAT " was removed with EOS.", pad);
free_output_slot_async (urisrc, info->output_slot);
if (urisrc->pending_pads &&
link_pending_pad_to_output (urisrc, info->output_slot)) {
} else {
free_output_slot_async (urisrc, info->output_slot);
} else {
GstStructure *s;
GstEvent *event;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment