From: Jan Schmidt Date: Tue, 17 Oct 2006 11:34:32 +0000 (+0000) Subject: gst/playback/gstdecodebin.c: Don't return a pad from get_our_ghost_pad unless it... X-Git-Tag: 1.19.3~511^2~11530 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7696cf6acbe415fb9e279c56f94a3c816c040039;p=platform%2Fupstream%2Fgstreamer.git gst/playback/gstdecodebin.c: Don't return a pad from get_our_ghost_pad unless it is actually the one we want. Original commit message from CVS: * gst/playback/gstdecodebin.c: (get_our_ghost_pad), (remove_element_chain): Don't return a pad from get_our_ghost_pad unless it is actually the one we want. Change a cast in remove_element_chain slightly. --- diff --git a/ChangeLog b/ChangeLog index 25dae7d..4e53824 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-10-17 Jan Schmidt + + * gst/playback/gstdecodebin.c: (get_our_ghost_pad), + (remove_element_chain): + Don't return a pad from get_our_ghost_pad unless it is actually the + one we want. + Change a cast in remove_element_chain slightly. + 2006-10-13 Julien MOUTTE * tests/examples/seek/seek.c: (do_seek), (start_seek), diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index efbf236..1756e59 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -974,6 +974,7 @@ get_our_ghost_pad (GstDecodeBin * decode_bin, GstPad * pad) /* our ghostpads are the sourcepads */ pad_it = gst_element_iterate_src_pads (GST_ELEMENT (decode_bin)); while (!done) { + db_pad = NULL; switch (gst_iterator_next (pad_it, (gpointer) & db_pad)) { case GST_ITERATOR_OK: GST_DEBUG_OBJECT (decode_bin, "looking at pad %s:%s", @@ -1072,10 +1073,10 @@ remove_element_chain (GstDecodeBin * decode_bin, GstPad * pad) GstObject *parent = gst_pad_get_parent (peer); if (parent) { - GstElement *grandparent = GST_ELEMENT (gst_object_get_parent (parent)); + GstObject *grandparent = gst_object_get_parent (parent); - if (grandparent) { - if (grandparent != GST_ELEMENT (decode_bin)) { + if (grandparent != NULL) { + if (GST_ELEMENT (grandparent) != GST_ELEMENT (decode_bin)) { GST_DEBUG_OBJECT (decode_bin, "dead end pad %s:%s parent %s", GST_DEBUG_PAD_NAME (peer), GST_OBJECT_NAME (grandparent)); } else {