summaryrefslogtreecommitdiffstats
path: root/video/vaapi.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-21 22:12:30 +0100
committerwm4 <wm4@nowhere>2015-01-21 22:12:30 +0100
commitb2149f7fe102f7d00beb2051e179160e47cbcbc6 (patch)
tree4fc5226f63eb71a167bb2cff0848011c0cca26e4 /video/vaapi.c
parenta1ed13869c1586897c323ebf65cfd3975092ffad (diff)
downloadmpv-b2149f7fe102f7d00beb2051e179160e47cbcbc6.tar.bz2
mpv-b2149f7fe102f7d00beb2051e179160e47cbcbc6.tar.xz
vaapi: minor simplification
Diffstat (limited to 'video/vaapi.c')
-rw-r--r--video/vaapi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/video/vaapi.c b/video/vaapi.c
index 981b6ee911..e7cd7591a1 100644
--- a/video/vaapi.c
+++ b/video/vaapi.c
@@ -149,9 +149,9 @@ void va_destroy(struct mp_vaapi_ctx *ctx)
}
}
-VAImageFormat *va_image_format_from_imgfmt(const struct va_image_formats *formats,
- int imgfmt)
+VAImageFormat *va_image_format_from_imgfmt(struct mp_vaapi_ctx *ctx, int imgfmt)
{
+ struct va_image_formats *formats = ctx->image_formats;
const int fourcc = va_fourcc_from_imgfmt(imgfmt);
if (!formats || !formats->num || !fourcc)
return NULL;
@@ -299,8 +299,7 @@ int va_surface_alloc_imgfmt(struct mp_image *img, int imgfmt)
if (p->image.image_id != VA_INVALID_ID &&
va_fourcc_to_imgfmt(p->image.format.fourcc) == imgfmt)
return 0;
- VAImageFormat *format =
- va_image_format_from_imgfmt(p->ctx->image_formats, imgfmt);
+ VAImageFormat *format = va_image_format_from_imgfmt(p->ctx, imgfmt);
if (!format)
return -1;
if (va_surface_image_alloc(img, format) < 0)