OSDN Git Service

Merge commit 'aae159a7cc4df7d0521901022b778c9da251c24e'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 14 Aug 2013 08:07:38 +0000 (10:07 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 14 Aug 2013 08:10:14 +0000 (10:10 +0200)
* commit 'aae159a7cc4df7d0521901022b778c9da251c24e':
  nuv: Do not ignore lzo decompression failures

Conflicts:
libavcodec/nuv.c
tests/ref/fate/nuv-rtjpeg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/nuv.c
tests/ref/fate/nuv-rtjpeg

@@@ -207,11 -199,13 +207,13 @@@ retry
      buf       = &buf[12];
      buf_size -= 12;
      if (comptype == NUV_RTJPEG_IN_LZO || comptype == NUV_LZO) {
 -        int outlen = c->decomp_size, inlen = buf_size;
 +        int outlen = c->decomp_size - AV_LZO_OUTPUT_PADDING, inlen = buf_size;
-         if (av_lzo1x_decode(c->decomp_buf, &outlen, buf, &inlen))
+         if (av_lzo1x_decode(c->decomp_buf, &outlen, buf, &inlen)) {
              av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n");
+             return AVERROR_INVALIDDATA;
+         }
          buf      = c->decomp_buf;
 -        buf_size = c->decomp_size;
 +        buf_size = c->decomp_size - AV_LZO_OUTPUT_PADDING - outlen;
      }
      if (c->codec_frameheader) {
          int w, h, q;
@@@ -1,10 -1,9 +1,9 @@@
 -#tb 0: 1/1000
 -0,        118,        118,        0,   460800, 0x54aedafe
 -0,        152,        152,        0,   460800, 0xb7aa8b56
 -0,        177,        177,        0,   460800, 0x283ea3b5
 -0,        202,        202,        0,   460800, 0x283ea3b5
 -0,        235,        235,        0,   460800, 0x10e577de
 -0,        269,        269,        0,   460800, 0x4e091ee2
 -0,        302,        302,        0,   460800, 0x2ea88828
 -0,        335,        335,        0,   460800, 0x4b7f4df0
 +#tb 0: 100/2997
 +0,          4,          4,        1,   460800, 0x54aedafe
 +0,          5,          5,        1,   460800, 0xb7aa8b56
 +0,          6,          6,        1,   460800, 0x283ea3b5
 +0,          7,          7,        1,   460800, 0x283ea3b5
 +0,          8,          8,        1,   460800, 0x10e577de
 +0,          9,          9,        1,   460800, 0x4e091ee2
 +0,         10,         10,        1,   460800, 0x2ea88828
 +0,         11,         11,        1,   460800, 0x4b7f4df0
- 0,         12,         12,        1,   460800, 0xa57f20d0