Commit 55b45d96 authored by gb's avatar gb

Fix gst_vaapi_image_create() from a foreign VA image.

parent ea2c6c50
......@@ -174,10 +174,6 @@ _gst_vaapi_image_create(GstVaapiImage *image, GstVaapiImageFormat format)
const VAImageFormat *va_format;
VAStatus status;
if (!priv->create_image)
return (priv->image.image_id != VA_INVALID_ID &&
priv->image.buf != VA_INVALID_ID);
if (!gst_vaapi_display_has_image_format(priv->display, format))
return FALSE;
......@@ -209,6 +205,10 @@ gst_vaapi_image_create(GstVaapiImage *image)
GstVaapiImageFormat format = priv->format;
const VAImageFormat *va_format;
if (!priv->create_image)
return (priv->image.image_id != VA_INVALID_ID &&
priv->image.buf != VA_INVALID_ID);
if (!_gst_vaapi_image_create(image, format)) {
switch (format) {
case GST_VAAPI_IMAGE_I420:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment