diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-08-12 00:16:12 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-08-24 16:37:01 +0200 |
commit | c92e37c20791580e88bdcf06f866a760a138eb07 (patch) | |
tree | 841c349fe6eae13498dbeeee153e598b69417aa3 | |
parent | dd923878e8efd85e27a0c6ea83175e166d273e28 (diff) | |
download | ffmpeg-c92e37c20791580e88bdcf06f866a760a138eb07.tar.gz |
nuv: Do not ignore lzo decompression failures
Update the fate reference since the last broken frame is not decoded
anymore.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit aae159a7cc4df7d0521901022b778c9da251c24e)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r-- | libavcodec/nuv.c | 4 | ||||
-rw-r--r-- | tests/ref/fate/nuv-rtjpeg | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index 0b47e974f5..9aa195f4db 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -198,8 +198,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, buf_size -= 12; if (comptype == NUV_RTJPEG_IN_LZO || comptype == NUV_LZO) { int outlen = c->decomp_size, 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; } diff --git a/tests/ref/fate/nuv-rtjpeg b/tests/ref/fate/nuv-rtjpeg index e9286d6a6d..a5c9c4a6f3 100644 --- a/tests/ref/fate/nuv-rtjpeg +++ b/tests/ref/fate/nuv-rtjpeg @@ -7,4 +7,3 @@ 0, 269, 269, 0, 460800, 0x4e091ee2 0, 302, 302, 0, 460800, 0x2ea88828 0, 335, 335, 0, 460800, 0x4b7f4df0 -0, 369, 369, 0, 460800, 0xb30eb322 |