summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_screenshot.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpcodecs/vf_screenshot.c')
-rw-r--r--libmpcodecs/vf_screenshot.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libmpcodecs/vf_screenshot.c b/libmpcodecs/vf_screenshot.c
index b85c9a4438..e917cf94cc 100644
--- a/libmpcodecs/vf_screenshot.c
+++ b/libmpcodecs/vf_screenshot.c
@@ -181,6 +181,12 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
vf->dmpi= vf_get_image(vf->next, mpi->imgfmt,
mpi->type, mpi->flags | MP_IMGFLAG_READABLE, mpi->width, mpi->height);
+ if((vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) &&
+ !(vf->dmpi->flags & MP_IMGFLAG_DIRECT)){
+ // use slices if DR isn't possible
+ return;
+ }
+
mpi->planes[0]=vf->dmpi->planes[0];
mpi->stride[0]=vf->dmpi->stride[0];
if(mpi->flags&MP_IMGFLAG_PLANAR){