Commit 188a1a17 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/movenc-test: Fix integer overflows

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 46feb669
......@@ -60,8 +60,8 @@ AVStream *video_st, *audio_st;
int64_t audio_dts, video_dts;
int bframes;
int duration;
int audio_duration;
int64_t duration;
int64_t audio_duration;
int frames;
int gop_size;
int64_t next_p_pts;
......@@ -196,9 +196,9 @@ static void init_fps(int bf, int audio_preroll, int fps)
frames = 0;
gop_size = 30;
duration = video_st->time_base.den / fps;
audio_duration = 1024 * audio_st->time_base.den / audio_st->codec->sample_rate;
audio_duration = 1024LL * audio_st->time_base.den / audio_st->codec->sample_rate;
if (audio_preroll)
audio_preroll = 2048 * audio_st->time_base.den / audio_st->codec->sample_rate;
audio_preroll = 2048LL * audio_st->time_base.den / audio_st->codec->sample_rate;
bframes = bf;
video_dts = bframes ? -duration : 0;
......
249e02e3645ea5ca2c74397c62c53314 3269 non-empty-moov
3281ff664e9a06e5a03ec6ea1729696c 3721 non-empty-moov-elst
b408a545b1963a5ea82cf37208b66548 3629 non-empty-moov-no-elst
f717c240ddfc036ed8a635b0af55bac2 11459 ismv
a66c786022280c1f69ad7c98c719fa53 4435 ismv
176a315a5385cb2e082d863e0fb22bf1 2891 empty-moov
10eb3fdf6ed1400a1eec50746537159f 3283 empty-moov-no-elst
bcd4d6d22f828f1061e13f3af459644f 3115 empty-moov-no-elst-no-adjust
......
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