Merge commit '071e29af4d383bdb44d0c87416dee3e4bb597936'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 10 Oct 2013 07:45:11 +0000 (09:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 10 Oct 2013 07:45:30 +0000 (09:45 +0200)
* commit '071e29af4d383bdb44d0c87416dee3e4bb597936':
  vmnc: Use meaningful return values

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

@@@ -455,21 -448,21 +455,21 @@@ static int decode_frame(AVCodecContext 
                  av_log(avctx, AV_LOG_ERROR,
                         "Premature end of data! (need %i got %i)\n",
                         w * h * c->bpp2, size_left);
-                 return -1;
+                 return AVERROR_INVALIDDATA;
              }
              paint_raw(outptr, w, h, gb, c->bpp2, c->bigendian,
 -                      c->pic.linesize[0]);
 +                      frame->linesize[0]);
              break;
          case 0x00000005: // HexTile encoded rectangle
              if ((dx + w > c->width) || (dy + h > c->height)) {
                  av_log(avctx, AV_LOG_ERROR,
                         "Incorrect frame size: %ix%i+%ix%i of %ix%i\n",
                         w, h, dx, dy, c->width, c->height);
-                 return -1;
+                 return AVERROR_INVALIDDATA;
              }
 -            res = decode_hextile(c, outptr, gb, w, h, c->pic.linesize[0]);
 +            res = decode_hextile(c, outptr, gb, w, h, frame->linesize[0]);
              if (res < 0)
-                 return -1;
+                 return res;
              break;
          default:
              av_log(avctx, AV_LOG_ERROR, "Unsupported block type 0x%08X\n", enc);