# HG changeset patch # User michael # Date 1107516400 0 # Node ID 9a6a30f512b29955663da943dc45e3aecb80363c # Parent 57e9d1bdcb0965d0a3cd2e196471e8c4c9427175 overflows diff -r 57e9d1bdcb09 -r 9a6a30f512b2 asf-enc.c --- a/asf-enc.c Fri Feb 04 03:38:33 2005 +0000 +++ b/asf-enc.c Fri Feb 04 11:26:40 2005 +0000 @@ -700,10 +700,10 @@ //XXX /FIXME use duration from AVPacket if (codec->codec_type == CODEC_TYPE_AUDIO) { - duration = (codec->frame_number * codec->frame_size * int64_t_C(10000000)) / + duration = (codec->frame_number * (int64_t)codec->frame_size * int64_t_C(10000000)) / codec->sample_rate; } else { - duration = av_rescale(codec->frame_number * codec->frame_rate_base, 10000000, codec->frame_rate); + duration = av_rescale(codec->frame_number * (int64_t)codec->frame_rate_base, 10000000, codec->frame_rate); } if (duration > asf->duration) asf->duration = duration; diff -r 57e9d1bdcb09 -r 9a6a30f512b2 avidec.c --- a/avidec.c Fri Feb 04 03:38:33 2005 +0000 +++ b/avidec.c Fri Feb 04 11:26:40 2005 +0000 @@ -229,7 +229,7 @@ nb_frames = get_le32(pb); st->start_time = 0; st->duration = av_rescale(nb_frames, - st->codec.frame_rate_base * AV_TIME_BASE, + st->codec.frame_rate_base * (int64_t)AV_TIME_BASE, st->codec.frame_rate); url_fskip(pb, size - 9 * 4); break;