ffmpeg: fix vstats
Broken by: 394fb56c29
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8560fdc451
commit
3868e97c6b
1 changed files with 3 additions and 1 deletions
4
ffmpeg.c
4
ffmpeg.c
|
@ -1396,6 +1396,7 @@ static void flush_encoders(void)
|
||||||
|
|
||||||
if (encode) {
|
if (encode) {
|
||||||
AVPacket pkt;
|
AVPacket pkt;
|
||||||
|
int pkt_size;
|
||||||
int got_packet;
|
int got_packet;
|
||||||
av_init_packet(&pkt);
|
av_init_packet(&pkt);
|
||||||
pkt.data = NULL;
|
pkt.data = NULL;
|
||||||
|
@ -1426,9 +1427,10 @@ static void flush_encoders(void)
|
||||||
pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base);
|
pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base);
|
||||||
if (pkt.duration > 0)
|
if (pkt.duration > 0)
|
||||||
pkt.duration = av_rescale_q(pkt.duration, enc->time_base, ost->st->time_base);
|
pkt.duration = av_rescale_q(pkt.duration, enc->time_base, ost->st->time_base);
|
||||||
|
pkt_size = pkt.size;
|
||||||
write_frame(os, &pkt, ost);
|
write_frame(os, &pkt, ost);
|
||||||
if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && vstats_filename) {
|
if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && vstats_filename) {
|
||||||
do_video_stats(ost, pkt.size);
|
do_video_stats(ost, pkt_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue