From: Sebastian Dröge Date: Thu, 28 Feb 2008 08:37:44 +0000 (+0000) Subject: gst/law/mulaw-decode.c: Return GST_FLOW_NOT_NEGOTIATED when the caps are not set... X-Git-Tag: RELEASE-0_10_8~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=593528c5f6bde202cf4f420afd077084ca153dd3;p=platform%2Fupstream%2Fgst-plugins-good.git gst/law/mulaw-decode.c: Return GST_FLOW_NOT_NEGOTIATED when the caps are not set yet on the srcpad. We need rate and ... Original commit message from CVS: * gst/law/mulaw-decode.c: (gst_mulawdec_chain): Return GST_FLOW_NOT_NEGOTIATED when the caps are not set yet on the srcpad. We need rate and channels before we can do any processing. Fixes bug #519088. --- diff --git a/ChangeLog b/ChangeLog index 1b4f029..da4876f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-02-28 Sebastian Dröge + + * gst/law/mulaw-decode.c: (gst_mulawdec_chain): + Return GST_FLOW_NOT_NEGOTIATED when the caps are not set + yet on the srcpad. We need rate and channels before we + can do any processing. Fixes bug #519088. + 2008-02-26 Jan Schmidt * configure.ac: diff --git a/gst/law/mulaw-decode.c b/gst/law/mulaw-decode.c index d7a858e..c39e26b 100644 --- a/gst/law/mulaw-decode.c +++ b/gst/law/mulaw-decode.c @@ -153,7 +153,12 @@ gst_mulawdec_chain (GstPad * pad, GstBuffer * buffer) GstBuffer *outbuf; GstFlowReturn ret; - mulawdec = GST_MULAWDEC (gst_pad_get_parent (pad)); + mulawdec = GST_MULAWDEC (GST_PAD_PARENT (pad)); + + if (G_UNLIKELY (mulawdec->srccaps == NULL)) { + gst_buffer_unref (buffer); + return GST_FLOW_NOT_NEGOTIATED; + } mulaw_data = (guint8 *) GST_BUFFER_DATA (buffer); mulaw_size = GST_BUFFER_SIZE (buffer); @@ -179,8 +184,6 @@ gst_mulawdec_chain (GstPad * pad, GstBuffer * buffer) ret = gst_pad_push (mulawdec->srcpad, outbuf); - gst_object_unref (mulawdec); - return ret; }