[FFmpeg-cvslog] nuv: Do not ignore lzo decompression failures

Luca Barbato git at videolan.org
Mon Nov 4 18:56:35 CET 2013


ffmpeg | branch: release/0.10 | Luca Barbato <lu_zero at gentoo.org> | Mon Aug 12 00:16:12 2013 +0200| [cda26ab21eb574e7e39b0a329941d87754b8c477] | committer: Luca Barbato

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 at libav.org
(cherry picked from commit aae159a7cc4df7d0521901022b778c9da251c24e)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

Conflicts:
	libavcodec/nuv.c

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cda26ab21eb574e7e39b0a329941d87754b8c477
---

 libavcodec/nuv.c   |    4 +++-
 tests/ref/fate/nuv |    1 -
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index 519b550..b4e21bf 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -177,8 +177,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     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 b/tests/ref/fate/nuv
index f1fcae3..c43c09c 100644
--- a/tests/ref/fate/nuv
+++ b/tests/ref/fate/nuv
@@ -18,7 +18,6 @@
 1, 20898, 4096, 0x28f7c6e5
 0, 21021, 460800, 0x4b7f4df0
 1, 22988, 4096, 0xca9d9df2
-0, 24024, 460800, 0xb30eb322
 1, 25078, 4096, 0x5c6b95a9
 1, 27167, 4096, 0x0bdfc0bf
 1, 29257, 4096, 0xd95a9277



More information about the ffmpeg-cvslog mailing list