avfilter/vf_vectorscope: avoid crash by explicitly checking for 8-bit depth
authorPaul B Mahol <onemda@gmail.com>
Tue, 1 Mar 2016 10:05:00 +0000 (11:05 +0100)
committerPaul B Mahol <onemda@gmail.com>
Wed, 2 Mar 2016 08:40:41 +0000 (09:40 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/vf_vectorscope.c

index 7389035..3659f79 100644 (file)
@@ -181,8 +181,10 @@ static int query_formats(AVFilterContext *ctx)
         out_pix_fmts = out_yuv9_pix_fmts;
     else if (depth == 10)
         out_pix_fmts = out_yuv10_pix_fmts;
-    else
+    else if (depth == 8)
         out_pix_fmts = out_yuv8_pix_fmts;
+    else
+        return AVERROR(EAGAIN);
     if ((ret = ff_formats_ref(ff_make_format_list(out_pix_fmts), &ctx->outputs[0]->in_formats)) < 0)
         return ret;