mirror of https://git.ffmpeg.org/ffmpeg.git
b frames + cbr fix
Originally committed as revision 2730 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
8fd19ab286
commit
2c8b796fa9
|
@ -1939,7 +1939,6 @@ int MPV_encode_picture(AVCodecContext *avctx,
|
|||
for(i=0; i<4; i++){
|
||||
avctx->error[i] += s->current_picture_ptr->error[i];
|
||||
}
|
||||
}
|
||||
|
||||
flush_put_bits(&s->pb);
|
||||
s->frame_bits = (pbBufPtr(&s->pb) - s->pb.buf) * 8;
|
||||
|
@ -1983,9 +1982,13 @@ int MPV_encode_picture(AVCodecContext *avctx,
|
|||
s->vbv_delay_ptr[2] &= 0x07;
|
||||
s->vbv_delay_ptr[2] |= vbv_delay<<3;
|
||||
}
|
||||
|
||||
s->total_bits += s->frame_bits;
|
||||
avctx->frame_bits = s->frame_bits;
|
||||
}else{
|
||||
assert((pbBufPtr(&s->pb) == s->pb.buf));
|
||||
s->frame_bits=0;
|
||||
}
|
||||
assert((s->frame_bits&7)==0);
|
||||
|
||||
return s->frame_bits/8;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue