summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r--fftools/ffmpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 7af24b4de2..f58258d45f 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -851,7 +851,7 @@ static void do_video_stats(OutputStream *ost, int frame_size)
}
enc = ost->enc_ctx;
- frame_number = ost->st->nb_frames;
+ frame_number = ost->packets_encoded;
if (vstats_version <= 1) {
fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number,
ost->quality / (float)FF_QP2LAMBDA);
@@ -950,6 +950,8 @@ static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame)
if (enc->codec_type == AVMEDIA_TYPE_VIDEO && vstats_filename)
do_video_stats(ost, pkt->size);
+ ost->packets_encoded++;
+
output_packet(of, pkt, ost, 0);
}