mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
overflows
Originally committed as revision 3935 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
3a615bb548
commit
8d65750ef1
@ -700,10 +700,10 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
|
||||
//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;
|
||||
|
@ -229,7 +229,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user