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

https://bugzilla.gnome.org/show_bug.cgi?id=598274
This commit is contained in:
Jan Schmidt 2009-10-13 13:04:47 +01:00
parent 7eb553e2de
commit 61eebb8cb5

View file

@ -740,10 +740,12 @@ gst_dtsdec_chain (GstPad * pad, GstBuffer * buf)
ret = gst_dtsdec_chain_raw (pad, subbuf); ret = gst_dtsdec_chain_raw (pad, subbuf);
} }
} else { } else {
gst_object_ref (buf);
ret = gst_dtsdec_chain_raw (pad, buf); ret = gst_dtsdec_chain_raw (pad, buf);
} }
done: done:
gst_object_unref (buf);
return ret; return ret;
/* ERRORS */ /* ERRORS */
@ -751,12 +753,14 @@ not_enough_data:
{ {
GST_ELEMENT_ERROR (GST_ELEMENT (dts), STREAM, DECODE, (NULL), GST_ELEMENT_ERROR (GST_ELEMENT (dts), STREAM, DECODE, (NULL),
("Insufficient data in buffer. Can't determine first_acess")); ("Insufficient data in buffer. Can't determine first_acess"));
gst_object_unref (buf);
return GST_FLOW_ERROR; return GST_FLOW_ERROR;
} }
bad_first_access_parameter: bad_first_access_parameter:
{ {
GST_ELEMENT_ERROR (GST_ELEMENT (dts), STREAM, DECODE, (NULL), GST_ELEMENT_ERROR (GST_ELEMENT (dts), STREAM, DECODE, (NULL),
("Bad first_access parameter (%d) in buffer", first_access)); ("Bad first_access parameter (%d) in buffer", first_access));
gst_object_unref (buf);
return GST_FLOW_ERROR; return GST_FLOW_ERROR;
} }
} }