Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-16 10:45:14 +0300
committerAnton Khirnov <anton@khirnov.net>2011-07-09 00:13:52 +0400
commit1c6d2b7df061de2a9205ed711f4344926237bb5f (patch)
tree3291fad26ceb1eb1f915dabe732c01bfacf81fdd /libavformat/utils.c
parente98bc78ca168bbb615752ed8e3b97bcacafdf0b7 (diff)
lavf: update AVStream.nb_frames when muxing.
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 060e58e9b2..e38d9efa60 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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);