mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
fftools/ffmpeg_opt: Fix signed integer overflow
Fixes ticket #8154. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 2b1fcba8ddcb7d29299ea28403fb597640a7288b) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
8ee6b52db0
commit
9744ed6e52
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* ffmpeg option parsing
|
* ffmpeg option parsing
|
||||||
*
|
*
|
||||||
@ -2729,13 +2730,14 @@ static int opt_target(void *optctx, const char *opt, const char *arg)
|
|||||||
} else {
|
} else {
|
||||||
/* Try to determine PAL/NTSC by peeking in the input files */
|
/* Try to determine PAL/NTSC by peeking in the input files */
|
||||||
if (nb_input_files) {
|
if (nb_input_files) {
|
||||||
int i, j, fr;
|
int i, j;
|
||||||
for (j = 0; j < nb_input_files; j++) {
|
for (j = 0; j < nb_input_files; j++) {
|
||||||
for (i = 0; i < input_files[j]->nb_streams; i++) {
|
for (i = 0; i < input_files[j]->nb_streams; i++) {
|
||||||
AVStream *st = input_files[j]->ctx->streams[i];
|
AVStream *st = input_files[j]->ctx->streams[i];
|
||||||
|
int64_t fr;
|
||||||
if (st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO)
|
if (st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO)
|
||||||
continue;
|
continue;
|
||||||
fr = st->time_base.den * 1000 / st->time_base.num;
|
fr = st->time_base.den * 1000LL / st->time_base.num;
|
||||||
if (fr == 25000) {
|
if (fr == 25000) {
|
||||||
norm = PAL;
|
norm = PAL;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user