aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-09-16 20:32:35 +0300
committerLuca Barbato <lu_zero@gentoo.org>2013-10-04 03:26:26 +0200
commit38bd229af9c4fa5897fc1a69e73a04c55f78647f (patch)
tree549b170497a21c86ffd12c99ed038c99bdcb9665
parentfe8bc7d1ee098de7f6da4d841a651773370ca454 (diff)
downloadffmpeg-38bd229af9c4fa5897fc1a69e73a04c55f78647f.tar.gz
ivi_common: Make sure color planes have been initialized
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st> (cherry picked from commit a92538b7c0defc86c55fb91f55dfa36aad192673) Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r--libavcodec/ivi_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 2a737547a5..152e9c4a55 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -938,6 +938,11 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
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;