pool: fix image pool to check for the video format to use.

Make gst_vaapi_image_pool_new() succeed, and thus returning a valid
image pool object, only if the underlying VA display does support the
requested VA image format.
This commit is contained in:
Gwenole Beauchesne 2013-07-10 13:32:15 +02:00
parent 4ca7922f4b
commit 60b003709f

View file

@ -54,7 +54,7 @@ image_pool_init(GstVaapiVideoPool *base_pool, const GstVideoInfo *vip)
pool->format = GST_VIDEO_INFO_FORMAT(vip);
pool->width = GST_VIDEO_INFO_WIDTH(vip);
pool->height = GST_VIDEO_INFO_HEIGHT(vip);
return TRUE;
return gst_vaapi_display_has_image_format(base_pool->display, pool->format);
}
static gpointer