diff --git a/ChangeLog b/ChangeLog index 450e857ae2..b1e2498d9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-01-19 Tim-Philipp Müller + + * gst/playback/gstplaybasebin.c: (analyse_source), (setup_source): + Plug a few reference leaks. + 2007-01-19 Tim-Philipp Müller * gst/typefind/gsttypefindfunctions.c: (mpeg2_sys_type_find): diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index 2ad2b09317..4d814f0608 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -1756,7 +1756,7 @@ analyse_source (GstPlayBaseBin * play_base_bin, gboolean * is_raw, pads_iter = gst_element_iterate_src_pads (play_base_bin->source); while (!done) { - GstPad *pad; + GstPad *pad = NULL; switch (gst_iterator_next (pads_iter, (gpointer) & pad)) { case GST_ITERATOR_ERROR: @@ -1777,13 +1777,18 @@ analyse_source (GstPlayBaseBin * play_base_bin, gboolean * is_raw, *have_out = TRUE; /* if FALSE, this pad has no caps and we continue with the next pad. */ - if (!has_all_raw_caps (pad, is_raw)) + if (!has_all_raw_caps (pad, is_raw)) { + gst_object_unref (pad); break; + } /* caps on source pad are all raw, we can add the pad */ - if (*is_raw) + if (*is_raw) { new_decoded_pad_full (play_base_bin->source, pad, FALSE, play_base_bin, FALSE); + } + + gst_object_unref (pad); break; } } @@ -2018,6 +2023,7 @@ setup_source (GstPlayBaseBin * play_base_bin) play_base_bin->subtitle = NULL; } } + gst_object_unref (db); } /* see if the source element emits raw audio/video all by itself, * if so, we can create streams for the pads and be done with it.