Browse Source

mfenc: Fix setting has_b_frames for max_b_frames == 1

This was a mistake in my own additions in
050b72ab5e.

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n4.3
Martin Storsjö 5 years ago
parent
commit
fea5f5bc64
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/mfenc.c

+ 1
- 1
libavcodec/mfenc.c View File

@@ -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));



Loading…
Cancel
Save