From 60b003709ffa76890e39d78a3ef528404f1821b5 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Wed, 10 Jul 2013 13:32:15 +0200 Subject: [PATCH] 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. --- gst-libs/gst/vaapi/gstvaapiimagepool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapiimagepool.c b/gst-libs/gst/vaapi/gstvaapiimagepool.c index 8b9a140264..3b5d4b775b 100644 --- a/gst-libs/gst/vaapi/gstvaapiimagepool.c +++ b/gst-libs/gst/vaapi/gstvaapiimagepool.c @@ -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