Commit 85dd497b authored by Paul B Mahol's avatar Paul B Mahol

avfilter/vf_vectorscope: avoid crash by explicitly checking for 8-bit depth

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent bd9c5875
...@@ -181,8 +181,10 @@ static int query_formats(AVFilterContext *ctx) ...@@ -181,8 +181,10 @@ static int query_formats(AVFilterContext *ctx)
out_pix_fmts = out_yuv9_pix_fmts; out_pix_fmts = out_yuv9_pix_fmts;
else if (depth == 10) else if (depth == 10)
out_pix_fmts = out_yuv10_pix_fmts; out_pix_fmts = out_yuv10_pix_fmts;
else else if (depth == 8)
out_pix_fmts = out_yuv8_pix_fmts; 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) if ((ret = ff_formats_ref(ff_make_format_list(out_pix_fmts), &ctx->outputs[0]->in_formats)) < 0)
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment