]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
grayscale only decoding
authormichaelni <michaelni@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 16 Jul 2002 10:19:00 +0000 (10:19 +0000)
committermichaelni <michaelni@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 16 Jul 2002 10:19:00 +0000 (10:19 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@766 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/svq1.c

index 910a31b32ce84d36a29988febc82435b6707ddcb..b43b10af3734259d548a18f5dcbe8c649afb50f5 100644 (file)
@@ -2586,6 +2586,7 @@ static int svq1_decode_frame(AVCodecContext *avctx,
       height = (s->height+15)&~15;
       linesize= s->linesize;
     } else {
+      if(s->flags&CODEC_FLAG_GRAY) break;
       width  = (s->width/4+15)&~15;
       height = (s->height/4+15)&~15;
       linesize= s->uvlinesize;
@@ -2658,6 +2659,7 @@ static int svq1_decode_init(AVCodecContext *avctx)
     avctx->mbskip_table= s->mbskip_table;
     avctx->pix_fmt = PIX_FMT_YUV410P;
     avctx->has_b_frames= s->has_b_frames=1; // not true, but DP frames and these behave like unidirectional b frames
+    s->flags= avctx->flags;
     if (MPV_common_init(s) < 0) return -1;
     return 0;
 }