From: Jun Zhao <barryjz...@tencent.com>

Add profile check for cavs decoder, now cavs decoder only support
JiZhun(0x20) profile

Signed-off-by: Jun Zhao <barryjz...@tencent.com>
---
 libavcodec/cavsdec.c | 5 +++++
 1 file changed, 5 insertions(+)

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
 
-- 
2.25.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to