diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 8bbd3a7580..e2c4d208d9 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -107,6 +107,10 @@ static int h263_decode_frame(AVCodecContext *avctx, if (ret < 0) return -1; + /* make sure we start with an I-Frame */ + if (!s->slice_height && (s->pict_type != I_TYPE)) + return -1; + MPV_frame_start(s); #ifdef DEBUG