a52dec: Fix reference leak on all input buffers in 'dvd mode'

https://bugzilla.gnome.org/show_bug.cgi?id=598272
This commit is contained in:
Jan Schmidt 2009-10-13 13:05:32 +01:00
parent 8486f0180b
commit 3e81d5f2c8

View file

@ -742,10 +742,12 @@ gst_a52dec_chain (GstPad * pad, GstBuffer * buf)
ret = gst_a52dec_chain_raw (pad, subbuf);
}
} else {
gst_buffer_ref (buf);
ret = gst_a52dec_chain_raw (pad, buf);
}
done:
gst_buffer_unref (buf);
return ret;
/* ERRORS */
@ -753,12 +755,14 @@ not_enough_data:
{
GST_ELEMENT_ERROR (GST_ELEMENT (a52dec), STREAM, DECODE, (NULL),
("Insufficient data in buffer. Can't determine first_acess"));
gst_buffer_unref (buf);
return GST_FLOW_ERROR;
}
bad_first_access_parameter:
{
GST_ELEMENT_ERROR (GST_ELEMENT (a52dec), STREAM, DECODE, (NULL),
("Bad first_access parameter (%d) in buffer", first_access));
gst_buffer_unref (buf);
return GST_FLOW_ERROR;
}
}