summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_vavpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter/vf_vavpp.c')
-rw-r--r--video/filter/vf_vavpp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/filter/vf_vavpp.c b/video/filter/vf_vavpp.c
index a4a14e0dda..d50242190a 100644
--- a/video/filter/vf_vavpp.c
+++ b/video/filter/vf_vavpp.c
@@ -160,9 +160,12 @@ static struct mp_image *render(struct vf_instance *vf, struct mp_image *in,
if (!p->pipe.filters || in_id == VA_INVALID_ID)
return NULL;
- struct mp_image *img = mp_image_pool_get(p->pool, IMGFMT_VAAPI, in->w, in->h);
+ int r_w, r_h;
+ va_surface_get_uncropped_size(in, &r_w, &r_h);
+ struct mp_image *img = mp_image_pool_get(p->pool, IMGFMT_VAAPI, r_w, r_h);
if (!img)
return NULL;
+ mp_image_set_size(img, in->w, in->h);
bool need_end_picture = false;
bool success = false;