mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
Fix gst_vaapi_image_create() from a foreign VA image.
This commit is contained in:
parent
ea2c6c502c
commit
55b45d964d
1 changed files with 4 additions and 4 deletions
|
@ -174,10 +174,6 @@ _gst_vaapi_image_create(GstVaapiImage *image, GstVaapiImageFormat format)
|
||||||
const VAImageFormat *va_format;
|
const VAImageFormat *va_format;
|
||||||
VAStatus status;
|
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))
|
if (!gst_vaapi_display_has_image_format(priv->display, format))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -209,6 +205,10 @@ gst_vaapi_image_create(GstVaapiImage *image)
|
||||||
GstVaapiImageFormat format = priv->format;
|
GstVaapiImageFormat format = priv->format;
|
||||||
const VAImageFormat *va_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)) {
|
if (!_gst_vaapi_image_create(image, format)) {
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case GST_VAAPI_IMAGE_I420:
|
case GST_VAAPI_IMAGE_I420:
|
||||||
|
|
Loading…
Reference in a new issue