History

mfenc: Fix setting has_b_frames for max_b_frames == 1

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

Martin Storsjö committed 6 years ago

Commit fea5f5b1 parent 1aec1fb1 file · +1 −1Browse files

Unified · Split

libavcodec/mfenc.c+1−1
@@ -677,7 +677,7 @@ static int mf_encv_output_adjust(AVCodecContext *avctx, IMFMediaType *type) · 676 unmodified lines
677677 // "scenario" to "camera_record" sets it in CFR mode (where the default
678678 // is VFR), which makes the encoder avoid dropping frames.
679679 ICodecAPI_SetValue(c->codec_api, &ff_CODECAPI_AVEncMPVDefaultBPictureCount, FF_VAL_VT_UI4(avctx->max_b_frames));
680− avctx->has_b_frames = avctx->max_b_frames > 1 ? 1 : 0;
680+ avctx->has_b_frames = avctx->max_b_frames > 0;
681681
682682 ICodecAPI_SetValue(c->codec_api, &ff_CODECAPI_AVEncH264CABACEnable, FF_VAL_VT_BOOL(1));
683683

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t