vaapivideomemory: fail if frame map can't get plane

If map() vmethod in GstVideMeta cannot get the plane data, return false,
thus the caller will not try to read invalid memory.

https://bugzilla.gnome.org/show_bug.cgi?id=774213
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-11-09 18:54:47 +01:00
parent 3fa9af225f
commit a02c86b395

View file

@ -319,7 +319,7 @@ gst_video_meta_map_vaapi_memory (GstVideoMeta * meta, guint plane,
*data = gst_vaapi_image_get_plane (mem->image, plane);
*stride = gst_vaapi_image_get_pitch (mem->image, plane);
info->flags = flags;
ret = TRUE;
ret = (*data != NULL);
out:
g_mutex_unlock (&mem->lock);