[FFmpeg-devel] [PATCH 2/2] avcodec/mediacodecdec: check ff_Build_SDK_INT return value
Zhao Zhili
quinkblack at foxmail.com
Mon Jan 9 18:36:40 EET 2023
From: Zhao Zhili <zhilizhao at tencent.com>
Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
---
libavcodec/mediacodecdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index 11f655a9aa..6ef23d7369 100644
--- a/libavcodec/mediacodecdec.c
+++ b/libavcodec/mediacodecdec.c
@@ -415,7 +415,7 @@ static av_cold int mediacodec_decode_init(AVCodecContext *avctx)
s->ctx->codec_name, ret);
sdk_int = ff_Build_SDK_INT(avctx);
- if (sdk_int <= 23 &&
+ if (sdk_int > 0 && sdk_int <= 23 &&
strcmp(s->ctx->codec_name, "OMX.amlogic.mpeg2.decoder.awesome") == 0) {
av_log(avctx, AV_LOG_INFO, "Enabling workaround for %s on API=%d\n",
s->ctx->codec_name, sdk_int);
--
2.25.1
More information about the ffmpeg-devel
mailing list