mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
vaapipostproc: fix reference counting buf for passthrough mode.
Fix reference counting bug for passthrough mode, whereby the input buffer was propagated as is downstream through gst_pad_push() without increasing its reference count before. The was a problem when gst_pad_push() returns an error and we further decrease the reference count of the input buffer.
This commit is contained in:
parent
945516c9c7
commit
6b259abc02
1 changed files with 5 additions and 2 deletions
|
@ -258,10 +258,13 @@ gst_vaapipostproc_process(GstVaapiPostproc *postproc, GstBuffer *buf)
|
||||||
|
|
||||||
/* Deinterlacing disabled, push frame */
|
/* Deinterlacing disabled, push frame */
|
||||||
if (!postproc->deinterlace) {
|
if (!postproc->deinterlace) {
|
||||||
gst_vaapi_video_meta_set_render_flags(meta, flags);
|
outbuf = gst_buffer_ref(buf);
|
||||||
ret = gst_pad_push(postproc->srcpad, buf);
|
if (!outbuf)
|
||||||
|
goto error_create_buffer;
|
||||||
|
ret = gst_pad_push(postproc->srcpad, outbuf);
|
||||||
if (ret != GST_FLOW_OK)
|
if (ret != GST_FLOW_OK)
|
||||||
goto error_push_buffer;
|
goto error_push_buffer;
|
||||||
|
gst_buffer_unref(buf);
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue