aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-08-09 17:18:59 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-08-09 17:18:59 +0000
commit9031aeb1cd8b0a5b5d4e6c11824a86c9c11ddcb2 (patch)
tree086f3b47c32cbb5643ee4401942ed566906f6e7b /libavformat
parent905694d96e9fe18298b1484946ce5966c64d1177 (diff)
downloadffmpeg-9031aeb1cd8b0a5b5d4e6c11824a86c9c11ddcb2.tar.gz
take care to use video track field number as duration
Originally committed as revision 10024 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/gxfenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c
index 2008e8e68a..2331bd80f4 100644
--- a/libavformat/gxfenc.c
+++ b/libavformat/gxfenc.c
@@ -679,9 +679,9 @@ static int gxf_write_trailer(AVFormatContext *s)
for (i = 0; i < s->nb_streams; ++i) {
if (s->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) {
av_fifo_free(&gxf->streams[i].audio_buffer);
- }
- if (s->streams[i]->codec->frame_number > gxf->nb_frames)
+ } else if (s->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) {
gxf->nb_frames = 2 * s->streams[i]->codec->frame_number;
+ }
}
gxf_write_eos_packet(pb, gxf);