mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-27 11:32:51 +00:00
plugins: fix creation of video buffer from another source buffer.
gst_vaapi_video_buffer_new_from_buffer() needs to reference the source buffer video meta since it would be unreference'd from the get_buffer() helper function. For other cases, we still use (steal) the newly created video meta.
This commit is contained in:
parent
7bb5750266
commit
4fa2315557
1 changed files with 5 additions and 1 deletions
|
@ -70,7 +70,11 @@ gst_vaapi_video_buffer_new_from_pool(GstVaapiVideoPool *pool)
|
|||
GstBuffer *
|
||||
gst_vaapi_video_buffer_new_from_buffer(GstBuffer *buffer)
|
||||
{
|
||||
return get_buffer(gst_buffer_get_vaapi_video_meta(buffer));
|
||||
GstVaapiVideoMeta * const meta = gst_buffer_get_vaapi_video_meta(buffer);
|
||||
|
||||
if (!meta)
|
||||
return NULL;
|
||||
return get_buffer(gst_vaapi_video_meta_ref(meta));
|
||||
}
|
||||
|
||||
GstBuffer *
|
||||
|
|
Loading…
Reference in a new issue