[FFmpeg-cvslog] avcodec/mpegvideo_enc: move ff_side_data_set_encoder_stats() call to after the vbv retry code
Michael Niedermayer
git at videolan.org
Tue Jul 28 01:14:55 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Jul 28 01:04:55 2015 +0200| [360cebc9c82c24abd92e8aee5e6d4819082431e1] | committer: Michael Niedermayer
avcodec/mpegvideo_enc: move ff_side_data_set_encoder_stats() call to after the vbv retry code
This ensures the data matches the final values
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=360cebc9c82c24abd92e8aee5e6d4819082431e1
---
libavcodec/mpegvideo_enc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 002843a..05e79c9 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1789,8 +1789,6 @@ vbv_retry:
frame_end(s);
- ff_side_data_set_encoder_stats(pkt, s->current_picture.f->quality, NULL, 0, s->pict_type);
-
if (CONFIG_MJPEG_ENCODER && s->out_format == FMT_MJPEG)
ff_mjpeg_encode_picture_trailer(&s->pb, s->header_bits);
@@ -1833,6 +1831,8 @@ vbv_retry:
av_assert0(s->avctx->rc_max_rate);
}
+ ff_side_data_set_encoder_stats(pkt, s->current_picture.f->quality, NULL, 0, s->pict_type);
+
if (s->avctx->flags & AV_CODEC_FLAG_PASS1)
ff_write_pass1_stats(s);
More information about the ffmpeg-cvslog
mailing list