diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-23 14:25:41 +0100 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2015-11-24 20:57:11 +0200 |
commit | 5b70fb8fee4af3b13f29a2dc7222fd3c9782f79b (patch) | |
tree | effb2f80eb250875026d20893bf925222363af09 /libavformat | |
parent | fdd5c48ebdec489ec9e84eee547fefa50c3ad53c (diff) |
movenc-test: Fix integer overflows
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/movenc-test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/movenc-test.c b/libavformat/movenc-test.c index 0a1384e281..0c40b3a9e0 100644 --- a/libavformat/movenc-test.c +++ b/libavformat/movenc-test.c @@ -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; |