diff options
author | Clément Bœsch <ubitux@gmail.com> | 2012-06-29 19:38:09 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-06-29 20:19:59 +0200 |
commit | 0ef28e119e0d61258cd67c8eb8ba74df393ad07b (patch) | |
tree | f5ef349c4ddb09797edb7befbd3c27e661122310 /libavformat/jacosubdec.c | |
parent | 60715511db338d860eb483586b055138fd5cdf0a (diff) | |
download | ffmpeg-0ef28e119e0d61258cd67c8eb8ba74df393ad07b.tar.gz |
lavf/jacosubdec: fix FPE in case timeres is badly set.
Diffstat (limited to 'libavformat/jacosubdec.c')
-rw-r--r-- | libavformat/jacosubdec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c index 4c82650692..cc4b978dae 100644 --- a/libavformat/jacosubdec.c +++ b/libavformat/jacosubdec.c @@ -219,7 +219,10 @@ static int jacosub_read_header(AVFormatContext *s) break; case 'T': // ...but must be placed after TIMERES jacosub->timeres = strtol(p, NULL, 10); - av_bprintf(&header, "#T %s", p); + if (!jacosub->timeres) + jacosub->timeres = 30; + else + av_bprintf(&header, "#T %s", p); break; } } |