[FFmpeg-cvslog] vp3: Check fps validity more completely

Michael Niedermayer git at videolan.org
Thu Mar 28 00:57:53 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 28 00:49:02 2013 +0100| [a56d963f111b1a192cdabb05500f8083bd77ca93] | committer: Michael Niedermayer

vp3: Check fps validity more completely

Fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/vp3.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 1e76786..ed5e534 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2224,7 +2224,7 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
 
     fps.num = get_bits_long(gb, 32);
     fps.den = get_bits_long(gb, 32);
-    if (fps.num && fps.den) {
+    if (fps.num>0 && fps.den>0) {
         av_reduce(&avctx->time_base.num, &avctx->time_base.den,
                   fps.den, fps.num, 1<<30);
     }



More information about the ffmpeg-cvslog mailing list