mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
vaapiconvert: fix autodetection for vaDeriveImage() support.
This commit is contained in:
parent
0a07620f37
commit
dd879638ca
1 changed files with 3 additions and 2 deletions
|
@ -493,7 +493,8 @@ gst_vaapiconvert_ensure_surface_pool(GstVaapiConvert *convert, GstCaps *caps)
|
|||
image = gst_vaapi_surface_derive_image(surface);
|
||||
if (image) {
|
||||
if (gst_vaapi_image_map(image)) {
|
||||
if (convert->direct_rendering_caps == 1)
|
||||
if (convert->direct_rendering_caps == 1 &&
|
||||
gst_vaapi_image_is_linear(image))
|
||||
convert->direct_rendering_caps = 2;
|
||||
gst_vaapi_image_unmap(image);
|
||||
}
|
||||
|
@ -593,7 +594,7 @@ gst_vaapiconvert_buffer_alloc(
|
|||
|
||||
surface = gst_vaapi_video_buffer_get_surface(vbuffer);
|
||||
image = gst_vaapi_surface_derive_image(surface);
|
||||
if (image) {
|
||||
if (image && gst_vaapi_image_get_data_size(image) == size) {
|
||||
gst_vaapi_video_buffer_set_image(vbuffer, image);
|
||||
gst_object_unref(image); /* video buffer owns an extra reference */
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue