changeset 4228:1cffc7036079 libavcodec

fix sigfpe with intra only encoding
author bcoudurier
date Wed, 22 Nov 2006 13:24:58 +0000
parents ef1d382309e5
children 304255e80196
files svq1.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/svq1.c	Wed Nov 22 09:20:16 2006 +0000
+++ b/svq1.c	Wed Nov 22 13:24:58 2006 +0000
@@ -1355,7 +1355,7 @@
     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);