Commit 7b23a1c2 authored by Guillaume Desmottes's avatar Guillaume Desmottes 🐐 Committed by Tim-Philipp Müller
Browse files

decodebin3: fix collection leaks

- gst_message_parse_stream_collection() returns an owned collection.
- get_merged_collection() returns one as well and was leaked in the
  else block.

Fix leak when running:
GST_TRACERS=leaks GST_DEBUG="GST_TRACER:7,leaks:6" gst-play-1.0 --use-playbin3 test.mkv

Part-of: <gstreamer/gstreamer!954>
parent 4f7e881f
Pipeline #492323 failed with stages
in 52 minutes and 9 seconds
......@@ -930,8 +930,11 @@ gst_decodebin3_input_pad_unlink (GstPad * pad, GstObject * parent)
SELECTION_UNLOCK (dbin);
gst_element_post_message (GST_ELEMENT_CAST (dbin), msg);
update_requested_selection (dbin);
} else
} else {
if (collection)
gst_object_unref (collection);
SELECTION_UNLOCK (dbin);
}
gst_bin_remove (GST_BIN (dbin), input->parsebin);
gst_element_set_state (input->parsebin, GST_STATE_NULL);
......@@ -1505,6 +1508,7 @@ gst_decodebin3_handle_message (GstBin * bin, GstMessage * message)
handle_stream_collection (dbin, collection,
(GstElement *) GST_MESSAGE_SRC (message));
posting_collection = TRUE;
gst_object_unref (collection);
INPUT_UNLOCK (dbin);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment