mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
gluploadelement: properly unref buffers that are the same as the input
basetransform doesn't unref equal input and output buffers
This commit is contained in:
parent
34485c9976
commit
067d5c45d2
1 changed files with 5 additions and 0 deletions
|
@ -211,6 +211,7 @@ gst_gl_upload_element_query (GstBaseTransform * bt, GstPadDirection direction,
|
|||
case GST_QUERY_DRAIN:
|
||||
if (upload->upload)
|
||||
gst_gl_upload_release_buffer (upload->upload);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -239,6 +240,10 @@ gst_gl_upload_element_prepare_output_buffer (GstBaseTransform * bt,
|
|||
gst_buffer_copy_into (*outbuf, buffer,
|
||||
GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
|
||||
|
||||
/* basetransform doesn't unref if they're the same */
|
||||
if (buffer == *outbuf)
|
||||
gst_buffer_unref (*outbuf);
|
||||
|
||||
return ret == GST_GL_UPLOAD_DONE ? GST_FLOW_OK : GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue