[FFmpeg-devel] [PATCH v2 6/7] avcodec/mediacodecenc: add max-bframes support
Zhao Zhili
quinkblack at foxmail.com
Wed Dec 7 11:31:21 EET 2022
From: Zhao Zhili <zhilizhao at tencent.com>
---
libavcodec/mediacodecenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 8e28a50e0d..e9cff8167a 100644
--- a/libavcodec/mediacodecenc.c
+++ b/libavcodec/mediacodecenc.c
@@ -264,6 +264,8 @@ static av_cold int mediacodec_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_DEBUG, "set level to 0x%x\n", s->level);
ff_AMediaFormat_setInt32(format, "level", s->level);
}
+ if (avctx->max_b_frames > 0)
+ ff_AMediaFormat_setInt32(format, "max-bframes", avctx->max_b_frames);
ret = ff_AMediaCodec_getConfigureFlagEncode(s->codec);
ret = ff_AMediaCodec_configure(s->codec, format, s->window, NULL, ret);
--
2.25.1
More information about the ffmpeg-devel
mailing list