From: Baptiste Coudurier Date: Wed, 22 Nov 2006 13:24:58 +0000 (+0000) Subject: fix sigfpe with intra only encoding X-Git-Tag: v0.5~10922 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f85675605973e96ced1dff1f00d12a32f3f0a2fb;p=platform%2Fupstream%2Flibav.git fix sigfpe with intra only encoding Originally committed as revision 7156 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/svq1.c b/libavcodec/svq1.c index a167ac9..957176e 100644 --- a/libavcodec/svq1.c +++ b/libavcodec/svq1.c @@ -1355,7 +1355,7 @@ static int svq1_encode_frame(AVCodecContext *avctx, unsigned char *buf, init_put_bits(&s->pb, buf, buf_size); *p = *pict; - p->pict_type = avctx->frame_number % avctx->gop_size ? P_TYPE : I_TYPE; + p->pict_type = avctx->gop_size && avctx->frame_number % avctx->gop_size ? P_TYPE : I_TYPE; p->key_frame = p->pict_type == I_TYPE; svq1_write_header(s, p->pict_type);