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: [PATCH] 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. --- ChangeLog | 5 +++++ ext/faad/gstfaad.c | 20 ++++++-------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f4b2217bf..0cba24d29d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-05-17 Tim-Philipp Müller + + * ext/faad/gstfaad.c: (gst_faad_update_caps), (gst_faad_chain): + Remove unused caps cruft from chain function altogether. + 2006-05-17 Edward Hervey * ext/faad/gstfaad.c: (gst_faad_chain): diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c index 8d86fc41a0..c17c32a86d 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; - } + ret = gst_pad_set_caps (faad->srcpad, caps); + gst_caps_unref (caps); - *p_caps = 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);