mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
avformat/jacosubdec: Check timeres
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 51f0ab8b12
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1e516d972d
commit
1ab57bfbdc
@ -236,14 +236,17 @@ static int jacosub_read_header(AVFormatContext *s)
|
||||
}
|
||||
av_bprintf(&header, "#S %s", p);
|
||||
break;
|
||||
case 'T': // ...but must be placed after TIMERES
|
||||
jacosub->timeres = strtol(p, NULL, 10);
|
||||
if (!jacosub->timeres)
|
||||
case 'T': { // ...but must be placed after TIMERES
|
||||
int64_t timeres = strtol(p, NULL, 10);
|
||||
if (timeres <= 0 || timeres > UINT32_MAX) {
|
||||
jacosub->timeres = 30;
|
||||
else
|
||||
} else {
|
||||
jacosub->timeres = timeres;
|
||||
av_bprintf(&header, "#T %s", p);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* general/essential directives in the extradata */
|
||||
|
Loading…
Reference in New Issue
Block a user