diff options
Diffstat (limited to 'gst/flx')
-rw-r--r-- | gst/flx/gstflxdec.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index e3e4bcc8..0ca9fc48 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -176,32 +176,29 @@ static gboolean gst_flxdec_src_event_handler (GstPad * pad, GstEvent * event) { GstFlxDec *flxdec = (GstFlxDec *) gst_pad_get_parent (pad); - - g_return_val_if_fail (GST_IS_EVENT (event), FALSE); + gboolean ret; /* TODO: implement the seek and other event handling */ - return gst_pad_push_event (flxdec->sinkpad, event); + ret = gst_pad_push_event (flxdec->sinkpad, event); + + gst_object_unref (flxdec); + + return ret; } static gboolean gst_flxdec_sink_event_handler (GstPad * pad, GstEvent * event) { - GstFlxDec *flxdec = (GstFlxDec *) gst_pad_get_parent (pad); - - g_return_val_if_fail (GST_IS_EVENT (event), FALSE); - - if (GST_EVENT_TYPE (event) == GST_EVENT_EOS || - GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) - GST_STREAM_LOCK (flxdec->srcpad); + GstFlxDec *flxdec; + gboolean ret; - gst_pad_push_event (flxdec->srcpad, gst_event_ref (event)); + flxdec = GST_FLXDEC (gst_pad_get_parent (pad)); - if (GST_EVENT_TYPE (event) == GST_EVENT_EOS || - GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) - GST_STREAM_UNLOCK (flxdec->srcpad); + ret = gst_pad_push_event (flxdec->srcpad, event); - return TRUE; + gst_object_unref (flxdec); + return ret; } static void |