From 7f8ffc4efddf796aa3aa8174fb008007cb8f8c1c Mon Sep 17 00:00:00 2001 From: Daniel Kang Date: Sun, 2 Jan 2011 05:01:46 +0000 Subject: [PATCH] Fix a floating point exception for invalid framerate, fixes issue 2470. Patch by Daniel Kang, daniel.d.kang at gmail Originally committed as revision 26188 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/yuv4mpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c index 99a1ce2f38..3a488649f3 100644 --- a/libavformat/yuv4mpeg.c +++ b/libavformat/yuv4mpeg.c @@ -316,7 +316,7 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap) pix_fmt = alt_pix_fmt; } - if (raten == 0 && rated == 0) { + if (raten <= 0 || rated <= 0) { // Frame rate unknown raten = 25; rated = 1;