diff options
author | wm4 <wm4@nowhere> | 2017-02-17 19:48:29 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-02-17 19:48:29 +0100 |
commit | f02752c0d591a3aea3f5ad5d98855a505f369510 (patch) | |
tree | 9341d842e4135d4d8b4039a66e69f3d68ab51c55 /video | |
parent | b3488822fdba55700faeafad5b3e453ca6e9675d (diff) | |
download | mpv-f02752c0d591a3aea3f5ad5d98855a505f369510.tar.bz2 mpv-f02752c0d591a3aea3f5ad5d98855a505f369510.tar.xz |
vo_opengl: don't crash on unsupported formats
Regression from recent refactor.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/opengl/formats.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/formats.c b/video/out/opengl/formats.c index 9bdc7828e5..1d1350ae1c 100644 --- a/video/out/opengl/formats.c +++ b/video/out/opengl/formats.c @@ -415,10 +415,11 @@ supported: snprintf(out->swizzle, sizeof(out->swizzle), "%s", swizzle); out->num_planes = desc.num_planes; for (int n = 0; n < desc.num_planes; n++) { + if (!planes[n]) + return false; out->xs[n] = desc.xs[n]; out->ys[n] = desc.ys[n]; out->planes[n] = planes[n]; - assert(planes[n]); } return true; } |