diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-02-08 00:38:24 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-02-08 00:38:24 +0000 |
commit | cb43c0e10d8feb1d3e0a4f72b18fac120c5bf22d (patch) | |
tree | 686b37ae4d288d5951334858f156754c442bc8cc | |
parent | 87094371dbe554541a18c01c7e934dc06b37e50f (diff) | |
download | ffmpeg-cb43c0e10d8feb1d3e0a4f72b18fac120c5bf22d.tar.gz |
audio duration fix?
Originally committed as revision 3952 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/avidec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 2eff64b5b0..540a022d0e 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -264,8 +264,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) ast->sample_size = get_le32(pb); /* sample ssize */ //av_log(NULL, AV_LOG_DEBUG, "%d %d %d %d\n", ast->scale, ast->rate, ast->sample_size, ast->start); st->start_time = 0; - if (ast->rate != 0) - st->duration = (int64_t)length * AV_TIME_BASE / ast->rate; + st->duration = av_rescale(length, ast->scale*(int64_t)AV_TIME_BASE, ast->rate); url_fskip(pb, size - 12 * 4); } break; |