Browse Source

jpegdec: Only enable rgb mode when there are 3 components.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.10
Michael Niedermayer 13 years ago
parent
commit
24964f21e4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/mjpegdec.c

+ 1
- 1
libavcodec/mjpegdec.c View File

@@ -279,7 +279,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
return -1;
}

if(s->v_max==1 && s->h_max==1 && s->lossless==1) s->rgb=1;
if(s->v_max==1 && s->h_max==1 && s->lossless==1 && nb_components==3) s->rgb=1;

/* if different size, realloc/alloc picture */
/* XXX: also check h_count and v_count */


Loading…
Cancel
Save