[FFmpeg-cvslog] indeo: print errors if transform and block size mismatch

Michael Niedermayer git at videolan.org
Sun Jul 14 16:02:19 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jul 14 14:20:42 2013 +0200| [76d0a6656bbfa2d43c2ef773d9b17562e60f7ed1] | committer: Michael Niedermayer

indeo: print errors if transform and block size mismatch

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/indeo4.c |    4 +++-
 libavcodec/indeo5.c |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 474140e..81a30ac 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -358,8 +358,10 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band,
             else
                 band->transform_size = 4;
 
-            if (band->blk_size != band->transform_size)
+            if (band->blk_size != band->transform_size) {
+                av_log(avctx, AV_LOG_ERROR, "transform and block size mismatch (%d != %d)\n", band->transform_size, band->blk_size);
                 return AVERROR_INVALIDDATA;
+            }
 
             scan_indx = get_bits(&ctx->gb, 4);
             if (scan_indx == 15) {
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
index 5d5bec8..4039c0a 100644
--- a/libavcodec/indeo5.c
+++ b/libavcodec/indeo5.c
@@ -191,8 +191,10 @@ static int decode_gop_header(IVI45DecContext *ctx, AVCodecContext *avctx)
             band->is_2d_trans = band->inv_transform == ff_ivi_inverse_slant_8x8 ||
                                 band->inv_transform == ff_ivi_inverse_slant_4x4;
 
-            if (band->transform_size != band->blk_size)
+            if (band->transform_size != band->blk_size) {
+                av_log(avctx, AV_LOG_ERROR, "transform and block size mismatch (%d != %d)\n", band->transform_size, band->blk_size);
                 return AVERROR_INVALIDDATA;
+            }
 
             /* select dequant matrix according to plane and band number */
             if (!p) {



More information about the ffmpeg-cvslog mailing list