summaryrefslogtreecommitdiffstats
path: root/video/out/vo_corevideo.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo_corevideo.c')
-rw-r--r--video/out/vo_corevideo.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/video/out/vo_corevideo.c b/video/out/vo_corevideo.c
index 20769d7ca1..d9e28e80fc 100644
--- a/video/out/vo_corevideo.c
+++ b/video/out/vo_corevideo.c
@@ -279,7 +279,7 @@ static int get_image_fmt(struct vo *vo, CVPixelBufferRef pbuf)
static mp_image_t *get_screenshot(struct vo *vo, CVPixelBufferRef pbuf)
{
int img_fmt = get_image_fmt(vo, pbuf);
- if (img_fmt < 0) return NULL;
+ if (img_fmt < 0 || !vo->params) return NULL;
struct priv *p = vo->priv;
CVPixelBufferLockBaseAddress(pbuf, 0);
@@ -295,8 +295,7 @@ static mp_image_t *get_screenshot(struct vo *vo, CVPixelBufferRef pbuf)
img.stride[0] = stride;
struct mp_image *image = mp_image_new_copy(&img);
- mp_image_set_display_size(image, vo->aspdat.prew, vo->aspdat.preh);
- mp_image_set_colorspace_details(image, &p->colorspace);
+ mp_image_set_attributes(image, vo->params);
CVPixelBufferUnlockBaseAddress(pbuf, 0);
return image;