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:
Gwenole Beauchesne 2013-03-20 14:02:48 +01:00
parent 7bb5750266
commit 4fa2315557

View file

@ -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 *