lavf: update AVStream.nb_frames when muxing.

This commit is contained in:
Anton Khirnov 2011-03-16 08:45:14 +01:00
parent e98bc78ca1
commit 1c6d2b7df0
2 changed files with 8 additions and 1 deletions

View file

@ -3023,6 +3023,9 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt)
return ret;
ret= s->oformat->write_packet(s, pkt);
if (ret >= 0)
s->streams[pkt->stream_index]->nb_frames++;
return ret;
}
@ -3143,6 +3146,8 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){
return ret;
ret= s->oformat->write_packet(s, &opkt);
if (ret >= 0)
s->streams[opkt.stream_index]->nb_frames++;
av_free_packet(&opkt);
pkt= NULL;
@ -3165,6 +3170,8 @@ int av_write_trailer(AVFormatContext *s)
break;
ret= s->oformat->write_packet(s, &pkt);
if (ret >= 0)
s->streams[pkt.stream_index]->nb_frames++;
av_free_packet(&pkt);