[FFmpeg-cvslog] ivi_common: Make sure color planes have been initialized

Martin Storsjö git at videolan.org
Thu Jan 16 21:57:39 CET 2014


ffmpeg | branch: release/0.10 | Martin Storsjö <martin at martin.st> | Mon Sep 16 20:32:35 2013 +0300| [843b330c3c9a3fc60bee5638e1fb47ace5db0c73] | committer: Luca Barbato

ivi_common: Make sure color planes have been initialized

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit a92538b7c0defc86c55fb91f55dfa36aad192673)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
(cherry picked from commit 38bd229af9c4fa5897fc1a69e73a04c55f78647f)

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

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

diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 91a42b1..84695a0 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -892,6 +892,11 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         return AVERROR_PATCHWELCOME;
     }
 
+    if (!ctx->planes[0].bands) {
+        av_log(avctx, AV_LOG_ERROR, "Color planes not initialized yet\n");
+        return AVERROR_INVALIDDATA;
+    }
+
     ctx->switch_buffers(ctx);
 
     //{ START_TIMER;



More information about the ffmpeg-cvslog mailing list