aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--libavformat/gxfenc.c4
-rw-r--r--tests/libav.regression.ref2
2 files changed, 3 insertions, 3 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);
diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref
index d3ad51e357..360f90b3b3 100644
--- a/tests/libav.regression.ref
+++ b/tests/libav.regression.ref
@@ -28,7 +28,7 @@ f8ad5bd78f4d012a8ce9570aa395ac54 *./tests/data/b-libav.flv
7820fa85ab86c62028d8dbda94589573 *./tests/data/b-libav.dv
3600000 ./tests/data/b-libav.dv
./tests/data/b-libav.dv CRC=0xf517e829
-15d8f0caadacf67a7e602fd244bc0c71 *./tests/data/b-libav.gxf
+2ba41cf880aa5cb87e8a08fdb735398d *./tests/data/b-libav.gxf
814640 ./tests/data/b-libav.gxf
./tests/data/b-libav.gxf CRC=0xa376c09e
9a9da315747599f7718cc9a9a09c21ff *./tests/data/b-libav.pbm