summaryrefslogtreecommitdiffstats
path: root/gst/monoscope
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-08-22 12:10:32 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-08-22 12:10:32 +0000
commit76ff577a41980357d999369bdce816df4c0f9152 (patch)
treeb4493fdde98f5f42072a5752cd8d9da473d7524c /gst/monoscope
parent177751c892f16e1d6640b6e381b155bebe3bfe56 (diff)
gst/monoscope/gstmonoscope.c: Don't unref buffers of which we've already given away ownership to the adapter.
Original commit message from CVS: * gst/monoscope/gstmonoscope.c: (gst_monoscope_chain): Don't unref buffers of which we've already given away ownership to the adapter.
Diffstat (limited to 'gst/monoscope')
-rw-r--r--gst/monoscope/gstmonoscope.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c
index 573b5bff..9d84cd91 100644
--- a/gst/monoscope/gstmonoscope.c
+++ b/gst/monoscope/gstmonoscope.c
@@ -345,10 +345,8 @@ gst_monoscope_chain (GstPad * pad, GstBuffer * inbuf)
/* do negotiation if not done yet, so ->spf etc. is set */
if (GST_PAD_CAPS (monoscope->srcpad) == NULL) {
flow_ret = get_buffer (monoscope, &outbuf);
- if (flow_ret != GST_FLOW_OK) {
- gst_buffer_unref (inbuf);
+ if (flow_ret != GST_FLOW_OK)
goto out;
- }
gst_buffer_unref (outbuf);
outbuf = NULL;
}
@@ -401,10 +399,8 @@ gst_monoscope_chain (GstPad * pad, GstBuffer * inbuf)
}
flow_ret = get_buffer (monoscope, &outbuf);
- if (flow_ret != GST_FLOW_OK) {
- gst_buffer_unref (inbuf);
+ if (flow_ret != GST_FLOW_OK)
goto out;
- }
memcpy (GST_BUFFER_DATA (outbuf), pixels, monoscope->outsize);