summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-17 19:48:29 +0100
committerwm4 <wm4@nowhere>2017-02-17 19:48:29 +0100
commitf02752c0d591a3aea3f5ad5d98855a505f369510 (patch)
tree9341d842e4135d4d8b4039a66e69f3d68ab51c55
parentb3488822fdba55700faeafad5b3e453ca6e9675d (diff)
downloadmpv-f02752c0d591a3aea3f5ad5d98855a505f369510.tar.bz2
mpv-f02752c0d591a3aea3f5ad5d98855a505f369510.tar.xz
vo_opengl: don't crash on unsupported formats
Regression from recent refactor.
-rw-r--r--video/out/opengl/formats.c3
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;
}