From 9b3c826eb9e3261eacfd92c5fa6195de5e80c1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 17 May 2006 09:39:53 +0000 Subject: ext/faad/gstfaad.c: Remove unused caps cruft from chain function altogether. Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_update_caps), (gst_faad_chain): Remove unused caps cruft from chain function altogether. --- ext/faad/gstfaad.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'ext/faad/gstfaad.c') diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c index 8d86fc41..c17c32a8 100644 --- a/ext/faad/gstfaad.c +++ b/ext/faad/gstfaad.c @@ -952,10 +952,10 @@ gst_faad_src_query (GstPad * pad, GstQuery * query) static gboolean -gst_faad_update_caps (GstFaad * faad, faacDecFrameInfo * info, - GstCaps ** p_caps) +gst_faad_update_caps (GstFaad * faad, faacDecFrameInfo * info) { GstAudioChannelPosition *pos; + gboolean ret; GstCaps *caps; /* store new negotiation information */ @@ -985,14 +985,10 @@ gst_faad_update_caps (GstFaad * faad, faacDecFrameInfo * info, GST_DEBUG ("New output caps: %" GST_PTR_FORMAT, caps); - if (!gst_pad_set_caps (faad->srcpad, caps)) { - gst_caps_unref (caps); - return FALSE; - } - - *p_caps = caps; + ret = gst_pad_set_caps (faad->srcpad, caps); + gst_caps_unref (caps); - return TRUE; + return ret; } /* @@ -1088,7 +1084,6 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer) guchar *input_data; GstFaad *faad; GstBuffer *outbuf; - GstCaps *caps = NULL; faacDecFrameInfo info; void *out; gboolean run_loop = TRUE; @@ -1246,7 +1241,7 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer) } if (fmt_change) { - if (!gst_faad_update_caps (faad, &info, &caps)) { + if (!gst_faad_update_caps (faad, &info)) { GST_ELEMENT_ERROR (faad, CORE, NEGOTIATION, (NULL), ("Setting caps on source pad failed")); ret = GST_FLOW_ERROR; @@ -1303,9 +1298,6 @@ next: out: - if (caps) - gst_caps_unref (caps); - gst_buffer_unref (buffer); gst_object_unref (faad); -- cgit v1.2.1