Skip to content
/ FFmpeg Public
forked from FFmpeg/FFmpeg

Commit

Permalink
fftools/ffmpeg_opt: Fix signed integer overflow
Browse files Browse the repository at this point in the history
Fixes ticket #8154.

Signed-off-by: Andreas Rheinhardt <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 2b1fcba)
Signed-off-by: Andreas Rheinhardt <[email protected]>
  • Loading branch information
mkver committed Jul 2, 2020
1 parent bf5f18c commit 95530c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fftools/ffmpeg_opt.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/*
* ffmpeg option parsing
*
Expand Down Expand Up @@ -2701,13 +2702,14 @@ static int opt_target(void *optctx, const char *opt, const char *arg)
} else {
/* Try to determine PAL/NTSC by peeking in the input files */
if (nb_input_files) {
int i, j, fr;
int i, j;
for (j = 0; j < nb_input_files; j++) {
for (i = 0; i < input_files[j]->nb_streams; i++) {
AVStream *st = input_files[j]->ctx->streams[i];
int64_t fr;
if (st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO)
continue;
fr = st->time_base.den * 1000 / st->time_base.num;
fr = st->time_base.den * 1000LL / st->time_base.num;
if (fr == 25000) {
norm = PAL;
break;
Expand Down

0 comments on commit 95530c6

Please sign in to comment.