From 917f58279da045fe512e76dbf90eecdcdbb5ccf9 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 25 Oct 2002 16:06:32 +0000
Subject: [PATCH] fixing decoding of streams with no keyframe at the start

Originally committed as revision 1072 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/msmpeg4.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 7d829cded56..cd74850f954 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -1170,6 +1170,8 @@ int ff_msmpeg4_decode_init(MpegEncContext *s)
         break;
     }
     
+    s->slice_height= s->mb_height; //to avoid 1/0 if the first frame isnt a keyframe
+    
     return 0;
 }
 
-- 
GitLab