gst/playback/gstplaybasebin.c: Plug a few reference leaks.

Original commit message from CVS:
* gst/playback/gstplaybasebin.c: (analyse_source), (setup_source):
Plug a few reference leaks.
This commit is contained in:
Tim-Philipp Müller 2007-01-19 18:47:30 +00:00
parent 91773593cf
commit 638dbd7b71
2 changed files with 14 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2007-01-19 Tim-Philipp Müller <tim at centricular dot net>
* gst/playback/gstplaybasebin.c: (analyse_source), (setup_source):
Plug a few reference leaks.
2007-01-19 Tim-Philipp Müller <tim at centricular dot net>
* gst/typefind/gsttypefindfunctions.c: (mpeg2_sys_type_find):

View file

@ -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.