summaryrefslogtreecommitdiff
path: root/libavcodec/cavsdec.c
diff options
context:
space:
mode:
authorJun Zhao <barryjzhao@tencent.com>2022-04-24 19:38:05 +0800
committerJun Zhao <barryjzhao@tencent.com>2022-05-08 10:38:54 +0800
commit68a7df5e9d737486892b0a924748e1c47f870d97 (patch)
treec7ed1f400652a6014561e7b48ff5cc309bea6217 /libavcodec/cavsdec.c
parent072a0daf5d99b92f833cc4e2807bc69eff2d338f (diff)
downloadffmpeg-68a7df5e9d737486892b0a924748e1c47f870d97.tar.gz
lavc/cavsdec: Add profile check
Add profile check for cavs decoder, now cavs decoder only support JiZhun(0x20) profile Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'libavcodec/cavsdec.c')
-rw-r--r--libavcodec/cavsdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 7aaf3f2bcf..6c69c2c94e 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -1177,6 +1177,11 @@ static int decode_seq_header(AVSContext *h)
int ret;
h->profile = get_bits(&h->gb, 8);
+ if (h->profile != 0x20) {
+ avpriv_report_missing_feature(h->avctx,
+ "only supprt JiZhun profile");
+ return AVERROR_PATCHWELCOME;
+ }
h->level = get_bits(&h->gb, 8);
skip_bits1(&h->gb); //progressive sequence