summaryrefslogtreecommitdiff
path: root/libavcodec/mfenc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-05-21 00:11:47 +0300
committerMartin Storsjö <martin@martin.st>2020-05-22 21:49:37 +0300
commitfea5f5bc64e02ab4f753aa55cc8eed4a893650a5 (patch)
treee37cdfa9304a42160cfcecda9f2d1108b92c0e5d /libavcodec/mfenc.c
parent1aec1fbcc5952e1c2f9820e032ad2e5f9bf1a670 (diff)
downloadffmpeg-fea5f5bc64e02ab4f753aa55cc8eed4a893650a5.tar.gz
mfenc: Fix setting has_b_frames for max_b_frames == 1
This was a mistake in my own additions in 050b72ab5ef318605b305aa6cb920e8b52f1002e. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/mfenc.c')
-rw-r--r--libavcodec/mfenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c
index dcc3b32307..edee0510b2 100644
--- a/libavcodec/mfenc.c
+++ b/libavcodec/mfenc.c
@@ -677,7 +677,7 @@ static int mf_encv_output_adjust(AVCodecContext *avctx, IMFMediaType *type)
// "scenario" to "camera_record" sets it in CFR mode (where the default
// is VFR), which makes the encoder avoid dropping frames.
ICodecAPI_SetValue(c->codec_api, &ff_CODECAPI_AVEncMPVDefaultBPictureCount, FF_VAL_VT_UI4(avctx->max_b_frames));
- avctx->has_b_frames = avctx->max_b_frames > 1 ? 1 : 0;
+ avctx->has_b_frames = avctx->max_b_frames > 0;
ICodecAPI_SetValue(c->codec_api, &ff_CODECAPI_AVEncH264CABACEnable, FF_VAL_VT_BOOL(1));