Browse Source

lavf/jacosubdec: fix FPE in case timeres is badly set.

tags/n1.0
Clément Bœsch 13 years ago
parent
commit
0ef28e119e
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/jacosubdec.c

+ 4
- 1
libavformat/jacosubdec.c View File

@@ -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;
}
}


Loading…
Cancel
Save