summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/out/gl_video.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index bb621df76e..19013c5272 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -667,7 +667,10 @@ static void pass_set_image_textures(struct gl_video *p, struct video_image *vimg
/ vimg->planes[1].tex_h;
if (p->hwdec_active) {
- p->hwdec->driver->map_image(p->hwdec, vimg->mpi, imgtex);
+ if (p->hwdec->driver->map_image(p->hwdec, vimg->mpi, imgtex) < 0) {
+ for (int n = 0; n < p->plane_count; n++)
+ imgtex[n] = -1;
+ }
} else {
for (int n = 0; n < p->plane_count; n++)
imgtex[n] = vimg->planes[n].gl_texture;