[SCM] libav/experimental: audio duration fix?
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 15:43:04 UTC 2013
The following commit has been merged in the experimental branch:
commit cb43c0e10d8feb1d3e0a4f72b18fac120c5bf22d
Author: Michael Niedermayer <michaelni at gmx.at>
Date: Tue Feb 8 00:38:24 2005 +0000
audio duration fix?
Originally committed as revision 3952 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 2eff64b..540a022 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;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list