From: Sreerenj Balachandran Date: Thu, 3 Jul 2014 15:41:11 +0000 (+0300) Subject: vaapivideomemory: fix determination of the surface pool format. X-Git-Tag: 0.5.9~28 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fgstreamer-vaapi.git;a=commitdiff_plain;h=9cb3acc813320aad072672296b5af168badf82a0 vaapivideomemory: fix determination of the surface pool format. While creating the vaapi video allocator, make sure the associated surface pool has correct format instead of defaulting to NV12 video format even though there is no direct rendering support. https://bugzilla.gnome.org/show_bug.cgi?id=732691 --- diff --git a/gst/vaapi/gstvaapivideomemory.c b/gst/vaapi/gstvaapivideomemory.c index 0400fef..9c0b5b9 100644 --- a/gst/vaapi/gstvaapivideomemory.c +++ b/gst/vaapi/gstvaapivideomemory.c @@ -515,12 +515,12 @@ gst_vaapi_video_allocator_new(GstVaapiDisplay *display, const GstVideoInfo *vip) image = gst_vaapi_surface_derive_image(surface); if (!image) break; - if (GST_VAAPI_IMAGE_FORMAT(image) != GST_VIDEO_INFO_FORMAT(vip)) - break; if (!gst_vaapi_image_map(image)) break; allocator->has_direct_rendering = gst_video_info_update_from_image( &allocator->surface_info, image); + if (GST_VAAPI_IMAGE_FORMAT(image) != GST_VIDEO_INFO_FORMAT(vip)) + allocator->has_direct_rendering = FALSE; gst_vaapi_image_unmap(image); GST_INFO("has direct-rendering for %s surfaces: %s", GST_VIDEO_INFO_FORMAT_STRING(&allocator->surface_info),