[FFmpeg-cvslog] lavc: fix duplicate stats_out line.

Michael Niedermayer git at videolan.org
Fri Nov 30 05:54:03 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Nov 30 05:31:41 2012 +0100| [d9bec3b6a29aaa41f7db80c32e444c6222430919] | committer: Michael Niedermayer

lavc: fix duplicate stats_out line.

Found-by: Thierry Foucu
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d9bec3b6a29aaa41f7db80c32e444c6222430919
---

 libavcodec/utils.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index a33d9c7..48ef679 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1466,6 +1466,9 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
     if(HAVE_THREADS && avctx->internal->frame_thread_encoder && (avctx->active_thread_type&FF_THREAD_FRAME))
         return ff_thread_video_encode_frame(avctx, avpkt, frame, got_packet_ptr);
 
+    if ((avctx->flags&CODEC_FLAG_PASS1) && avctx->stats_out)
+        avctx->stats_out[0] = '\0';
+
     if (!(avctx->codec->capabilities & CODEC_CAP_DELAY) && !frame) {
         av_free_packet(avpkt);
         av_init_packet(avpkt);



More information about the ffmpeg-cvslog mailing list