faad2: Don't leak element reference in the setcaps function

Fixes bug #598139.
This commit is contained in:
Peter Christoffersen 2009-10-13 16:01:26 +02:00 committed by Sebastian Dröge
parent b8c520d874
commit 7eb553e2de

View file

@ -393,17 +393,20 @@ gst_faad_setcaps (GstPad * pad, GstCaps * caps)
if (!faad->packetised) if (!faad->packetised)
gst_faad_send_tags (faad); gst_faad_send_tags (faad);
gst_object_unref (faad);
return TRUE; return TRUE;
/* ERRORS */ /* ERRORS */
wrong_length: wrong_length:
{ {
GST_DEBUG_OBJECT (faad, "codec_data less than 2 bytes long"); GST_DEBUG_OBJECT (faad, "codec_data less than 2 bytes long");
gst_object_unref (faad);
return FALSE; return FALSE;
} }
init_failed: init_failed:
{ {
GST_DEBUG_OBJECT (faad, "faacDecInit2() failed"); GST_DEBUG_OBJECT (faad, "faacDecInit2() failed");
gst_object_unref (faad);
return FALSE; return FALSE;
} }
} }