vaapivideomemory: unroll gst_vaapi_surface_new_with_format()

gst_vaapi_surface_new_with_format() is a wrapper for
gst_vaapi_surface_new_full (). In this case, the former is simpler
than the first. This patch changes that.
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-01-09 12:51:11 +01:00
parent b23640fb27
commit 7ced30dbac

View file

@ -172,9 +172,7 @@ new_surface (GstVaapiDisplay * display, const GstVideoInfo * vip,
/* Try with explicit format first */
if (!use_native_formats (usage_flag) &&
GST_VIDEO_INFO_FORMAT (vip) != GST_VIDEO_FORMAT_ENCODED) {
surface = gst_vaapi_surface_new_with_format (display,
GST_VIDEO_INFO_FORMAT (vip), GST_VIDEO_INFO_WIDTH (vip),
GST_VIDEO_INFO_HEIGHT (vip));
surface = gst_vaapi_surface_new_full (display, vip, 0);
if (surface)
return surface;
}