OSDN Git Service

Merge commit '1b20d0f581f01f2df601c9e68d0d321672d97af7'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 14 Oct 2013 00:10:43 +0000 (02:10 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 14 Oct 2013 00:10:43 +0000 (02:10 +0200)
* commit '1b20d0f581f01f2df601c9e68d0d321672d97af7':
  cavs: Return meaningful error values

Conflicts:
libavcodec/cavsdec.c

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

@@@ -555,8 -550,7 +555,8 @@@ static int decode_residual_block(AVSCon
                                   const struct dec_2dvlc *r, int esc_golomb_order,
                                   int qp, uint8_t *dst, int stride)
  {
-     int i, esc_code, level, mask;
 -    int i, level_code, esc_code, level, run, mask, ret;
++    int i, esc_code, level, mask, ret;
 +    unsigned int level_code, run;
      int16_t level_buf[65];
      uint8_t run_buf[65];
      int16_t *block = h->block;
@@@ -608,9 -602,9 +608,9 @@@ static inline int decode_residual_inter
  
      /* get coded block pattern */
      int cbp = get_ue_golomb(&h->gb);
 -    if (cbp > 63) {
 +    if (cbp > 63U) {
          av_log(h->avctx, AV_LOG_ERROR, "illegal inter cbp\n");
-         return -1;
+         return AVERROR_INVALIDDATA;
      }
      h->cbp = cbp_tab[cbp][1];
  
@@@ -679,9 -673,9 +679,9 @@@ static int decode_mb_i(AVSContext *h, i
      /* get coded block pattern */
      if (h->cur.f->pict_type == AV_PICTURE_TYPE_I)
          cbp_code = get_ue_golomb(gb);
 -    if (cbp_code > 63) {
 +    if (cbp_code > 63U) {
          av_log(h->avctx, AV_LOG_ERROR, "illegal intra cbp\n");
-         return -1;
+         return AVERROR_INVALIDDATA;
      }
      h->cbp = cbp_tab[cbp_code][0];
      if (h->cbp && !h->qp_fixed)