Mercurial > libavformat.hg
changeset 673:8e67ff57ac9c libavformat
audio duration fix?
author | michael |
---|---|
date | Tue, 08 Feb 2005 00:38:24 +0000 |
parents | e23ef5378293 |
children | b2ee9f2492d7 |
files | avidec.c |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/avidec.c Mon Feb 07 23:13:38 2005 +0000 +++ b/avidec.c Tue Feb 08 00:38:24 2005 +0000 @@ -264,8 +264,7 @@ 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;