You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/mpegvideo_enc: Set b-frame chain length properly
Fixes a regression caused by my desire to use loop-scope
for iterators in 72bf3d3c12
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -1726,8 +1726,9 @@ static int set_bframe_chain_length(MPVMainEncContext *const m)
|
||||
s->c.linesize) + 1;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < m->max_b_frames + 1; i++) {
|
||||
if (!m->input_picture[i] ||
|
||||
for (int i = 0;; i++) {
|
||||
if (i >= m->max_b_frames + 1 ||
|
||||
!m->input_picture[i] ||
|
||||
m->input_picture[i]->b_frame_score - 1 >
|
||||
s->c.mb_num / m->b_sensitivity) {
|
||||
b_frames = FFMAX(0, i - 1);
|
||||
|
Reference in New Issue
Block a user