summaryrefslogtreecommitdiff
path: root/libavfilter/vf_vectorscope.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-03-01 11:05:00 +0100
committerPaul B Mahol <onemda@gmail.com>2016-03-02 09:40:41 +0100
commit85dd497baad0f0667636bb17c6d2463d5f15a532 (patch)
treebe146b5ebbfd9b0ee8ea25b5c5cee5d03ede5a6a /libavfilter/vf_vectorscope.c
parentbd9c58756a50b52e495b748d6ea6b0aafe397c25 (diff)
downloadffmpeg-85dd497baad0f0667636bb17c6d2463d5f15a532.tar.gz
avfilter/vf_vectorscope: avoid crash by explicitly checking for 8-bit depth
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_vectorscope.c')
-rw-r--r--libavfilter/vf_vectorscope.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_vectorscope.c b/libavfilter/vf_vectorscope.c
index 7389035671..3659f79a71 100644
--- a/libavfilter/vf_vectorscope.c
+++ b/libavfilter/vf_vectorscope.c
@@ -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;