[FFmpeg-devel] [PATCH] [PATCH] Update video stats log during encode flush

Thierry Foucu tfoucu at gmail.com
Tue Dec 4 07:01:38 CET 2012


---
 ffmpeg.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 55b5f86..c32321d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1304,6 +1304,11 @@ static void flush_encoders(void)
                 if (pkt.duration > 0)
                     pkt.duration = av_rescale_q(pkt.duration, enc->time_base, ost->st->time_base);
                 write_frame(os, &pkt, ost);
+                ost->frame_number ++;
+                ost->sync_opts ++;
+                if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && vstats_filename) {
+                  do_video_stats(ost, pkt.size);
+                }
             }
 
             if (stop_encoding)
-- 
1.7.7.3



More information about the ffmpeg-devel mailing list