[FFmpeg-cvslog] indeo: check that band output buffer exists

Kostya Shishkov git at videolan.org
Sun May 20 23:00:48 CEST 2012


ffmpeg | branch: master | Kostya Shishkov <kostya.shishkov at gmail.com> | Sat May 19 13:45:00 2012 +0200| [96037382210b5c1b0202647ac0ca196ce5de4487] | committer: Kostya Shishkov

indeo: check that band output buffer exists

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

 libavcodec/ivi_common.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 0d77376..6979231 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -641,6 +641,10 @@ static int decode_band(IVI45DecContext *ctx, int plane_num,
     IVITile     *tile;
 
     band->buf     = band->bufs[ctx->dst_buf];
+    if (!band->buf) {
+        av_log(avctx, AV_LOG_ERROR, "Band buffer points to no data!\n");
+        return AVERROR_INVALIDDATA;
+    }
     band->ref_buf = band->bufs[ctx->ref_buf];
     band->data_ptr = ctx->frame_data + (get_bits_count(&ctx->gb) >> 3);
 



More information about the ffmpeg-cvslog mailing list