Original commit message from CVS:
* gst/selector/gstinputselector.c: (gst_input_selector_event),
(gst_input_selector_query):
Gracefully handle the cases when we dont' have otherpad.
Fixes #556430
+2008-10-15 Edward Hervey <edward.hervey@collabora.co.uk>
+
+ * gst/selector/gstinputselector.c: (gst_input_selector_event),
+ (gst_input_selector_query):
+ Gracefully handle the cases when we dont' have otherpad.
+ Fixes #556430
+
2008-10-14 Edward Hervey <edward.hervey@collabora.co.uk>
* gst/aiffparse/aiffparse.c: (plugin_init):
2008-10-14 Edward Hervey <edward.hervey@collabora.co.uk>
* gst/aiffparse/aiffparse.c: (plugin_init):
static gboolean
gst_input_selector_event (GstPad * pad, GstEvent * event)
{
static gboolean
gst_input_selector_event (GstPad * pad, GstEvent * event)
{
GstPad *otherpad;
otherpad = gst_input_selector_get_linked_pad (pad, TRUE);
GstPad *otherpad;
otherpad = gst_input_selector_get_linked_pad (pad, TRUE);
- res = gst_pad_push_event (otherpad, event);
-
- gst_object_unref (otherpad);
+ if (otherpad) {
+ res = gst_pad_push_event (otherpad, event);
+ gst_object_unref (otherpad);
+ }
static gboolean
gst_input_selector_query (GstPad * pad, GstQuery * query)
{
static gboolean
gst_input_selector_query (GstPad * pad, GstQuery * query)
{
GstInputSelector *sel;
GstPad *otherpad;
GstInputSelector *sel;
GstPad *otherpad;
- res = gst_pad_peer_query (otherpad, query);
+ if (otherpad)
+ res = gst_pad_peer_query (otherpad, query);
- gst_object_unref (otherpad);
+ if (otherpad)
+ gst_object_unref (otherpad);
gst_object_unref (sel);
return res;
gst_object_unref (sel);
return res;