diff options
author | Zhao Zhili <zhilizhao@tencent.com> | 2022-12-07 17:31:21 +0800 |
---|---|---|
committer | Zhao Zhili <zhilizhao@tencent.com> | 2022-12-17 04:31:04 +0800 |
commit | a86bb1d2ce9b11a00fa343748b4768c6534b416f (patch) | |
tree | f4763705f1e1a6f934ebc6f3664359dd4b7f3b25 | |
parent | 7da1adfc026a57ab3fb42516354f8e62f3f7d35d (diff) | |
download | ffmpeg-a86bb1d2ce9b11a00fa343748b4768c6534b416f.tar.gz |
avcodec/mediacodecenc: add max-bframes support
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
-rw-r--r-- | libavcodec/mediacodecenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 96bc9c9c28..50994ce864 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -275,6 +275,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); |