Fix gst_vaapi_video_allocator_new() to silently check for direct-rendering
mode support, and not trigger fatal-criticals if either test surface or
image could not be created. Typical case: pixel format mismatch, e.g. NV12
supported by most hardware vs. I420 supported by most software decoders.
GST_VIDEO_INFO_FORMAT_STRING(&allocator->surface_info),
allocator->has_direct_rendering ? "yes" : "no");
} while (0);
- gst_vaapi_object_unref(surface);
- gst_vaapi_object_unref(image);
+ if (surface)
+ gst_vaapi_object_unref(surface);
+ if (image)
+ gst_vaapi_object_unref(image);
}
allocator->image_info = *vip;