mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
glupload/colorconvert: only copy timestamps if the input buffer != output
This commit is contained in:
parent
63366be8ad
commit
f58b5b65f1
2 changed files with 6 additions and 4 deletions
|
@ -190,6 +190,9 @@ gst_gl_color_convert_element_prepare_output_buffer (GstBaseTransform * bt,
|
|||
|
||||
*outbuf = gst_gl_color_convert_perform (convert->convert, inbuf);
|
||||
|
||||
/* basetransform doesn't unref if they're the same */
|
||||
if (inbuf == *outbuf)
|
||||
gst_buffer_unref (*outbuf);
|
||||
if (*outbuf)
|
||||
gst_buffer_copy_into (*outbuf, inbuf,
|
||||
GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
|
||||
|
|
|
@ -236,13 +236,12 @@ gst_gl_upload_element_prepare_output_buffer (GstBaseTransform * bt,
|
|||
|
||||
ret = gst_gl_upload_perform_with_buffer (upload->upload, buffer, outbuf);
|
||||
|
||||
if (*outbuf)
|
||||
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);
|
||||
else if (*outbuf)
|
||||
gst_buffer_copy_into (*outbuf, buffer,
|
||||
GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
|
||||
|
||||
return ret == GST_GL_UPLOAD_DONE ? GST_FLOW_OK : GST_FLOW_ERROR;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue