[FFmpeg-cvslog] lavf/jacosubdec: fix FPE in case timeres is badly set.

Clément Bœsch git at videolan.org
Fri Jun 29 20:29:52 CEST 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Fri Jun 29 19:38:09 2012 +0200| [0ef28e119e0d61258cd67c8eb8ba74df393ad07b] | committer: Clément Bœsch

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ef28e119e0d61258cd67c8eb8ba74df393ad07b
---

 libavformat/jacosubdec.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c
index 4c82650..cc4b978 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;
         }
     }



More information about the ffmpeg-cvslog mailing list