mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-26 04:50:25 +00:00
In libx264 wrapper, fix side effect with has_b_frames, bframe_pyramid can be set
when bframe is not.
This commit is contained in:
parent
2ef2496cd1
commit
c225615bf2
@ -366,7 +366,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
|
||||
x4->params.b_repeat_headers = 0;
|
||||
|
||||
// update AVCodecContext with x264 parameters
|
||||
avctx->has_b_frames = x4->params.i_bframe_pyramid ? 2 : !!x4->params.i_bframe;
|
||||
avctx->has_b_frames = x4->params.i_bframe ?
|
||||
x4->params.i_bframe_pyramid ? 2 : 1 : 0;
|
||||
avctx->bit_rate = x4->params.rc.i_bitrate*1000;
|
||||
avctx->crf = x4->params.rc.f_rf_constant;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user