Commit 0c02426b authored by michael's avatar michael

audio duration fix?


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3952 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bb1f2e38
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment