Merge commit 'ef35d6dbc6c3b7ba6b13ac13fc8e797cc1268c8f'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 3 Jul 2013 12:49:28 +0000 (14:49 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 3 Jul 2013 12:50:51 +0000 (14:50 +0200)
* commit 'ef35d6dbc6c3b7ba6b13ac13fc8e797cc1268c8f':
  jpeg2000: Propagate error code from get_cox()
  jpeg2000: Check that nreslevels2decode has been initialized before use

Conflicts:
libavcodec/jpeg2000dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/jpeg2000.c

@@@ -198,11 -204,11 +198,11 @@@ int ff_jpeg2000_init_component(Jpeg2000
  {
      uint8_t log2_band_prec_width, log2_band_prec_height;
      int reslevelno, bandno, gbandno = 0, ret, i, j;
 -    uint32_t csize = 1;
 +    uint32_t csize;
  
 -    if (!codsty->nreslevels2decode) {
 -        av_log(avctx, AV_LOG_ERROR, "nreslevels2decode uninitialized\n");
 +    if (codsty->nreslevels2decode <= 0) {
 +        av_log(avctx, AV_LOG_ERROR, "nreslevels2decode %d invalid or uninitialized\n", codsty->nreslevels2decode);
-         return AVERROR(EINVAL);
+         return AVERROR_INVALIDDATA;
      }
  
      if (ret = ff_jpeg2000_dwt_init(&comp->dwt, comp->coord,