From 98482c3a0e5b909c9d5d913d11f145e5bccf11fb Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 4 Apr 2014 02:14:50 +1100 Subject: [PATCH] playbin: Drop reference to any source element in NULL state Drop the reference instead of waiting for either finalize(), or for a new source when reused. Everyone else already forgot about the old source. --- gst/playback/gstplaybin2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 5e1ee7ee1d..89bb951dc2 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -5547,6 +5547,12 @@ gst_play_bin_change_state (GstElement * element, GstStateChange transition) l = l->next; } } + + if (playbin->source) { + gst_object_unref (playbin->source); + playbin->source = NULL; + } + GST_OBJECT_UNLOCK (playbin); break; }