aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Shaposhnik <roman@shaposhnik.org>2003-09-22 18:17:45 +0000
committerRoman Shaposhnik <roman@shaposhnik.org>2003-09-22 18:17:45 +0000
commitfd0f45e58b010c0d7049914a392c3e96a2223107 (patch)
tree5867912dc0f78a0db30228272e3665d142843684
parent3f4185517f12c45de316e67b9e733603116a51d3 (diff)
downloadffmpeg-fd0f45e58b010c0d7049914a392c3e96a2223107.tar.gz
* fix for integer overflow
Originally committed as revision 2297 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 34958abee3..9784b52351 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1125,11 +1125,11 @@ static int av_encode(AVFormatContext **output_files,
switch (ist->st->codec.codec_type) {
case CODEC_TYPE_AUDIO:
av_frac_init(&ist->next_pts,
- 0, 0, is->pts_num * ist->st->codec.sample_rate);
+ 0, 0, (uint64_t)is->pts_num * ist->st->codec.sample_rate);
break;
case CODEC_TYPE_VIDEO:
av_frac_init(&ist->next_pts,
- 0, 0, is->pts_num * ist->st->codec.frame_rate);
+ 0, 0, (uint64_t)is->pts_num * ist->st->codec.frame_rate);
break;
default:
break;
@@ -1275,7 +1275,7 @@ static int av_encode(AVFormatContext **output_files,
}
data_buf = (uint8_t *)samples;
av_frac_add(&ist->next_pts,
- is->pts_den * data_size / (2 * ist->st->codec.channels));
+ (uint64_t)is->pts_den * data_size / (2 * ist->st->codec.channels));
break;
case CODEC_TYPE_VIDEO:
{
@@ -1300,7 +1300,7 @@ static int av_encode(AVFormatContext **output_files,
continue;
}
av_frac_add(&ist->next_pts,
- is->pts_den * ist->st->codec.frame_rate_base);
+ (uint64_t)is->pts_den * ist->st->codec.frame_rate_base);
}
break;
default: