aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ivi_common.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-08 01:06:45 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-10-08 01:06:45 +0200
commit55aedd679a24055e861c3debe0397b2cd05ef1be (patch)
treefe9eb65e1a6b02d3c484ddf732c08f2a5d21ff90 /libavcodec/ivi_common.c
parentaf26185bdc35bab5183e5016becd048eb50c29a1 (diff)
parentce1dacb435460dda1f9d453eaaeac44bd502aca4 (diff)
downloadffmpeg-55aedd679a24055e861c3debe0397b2cd05ef1be.tar.gz
Merge commit 'ce1dacb435460dda1f9d453eaaeac44bd502aca4' into release/1.1
* commit 'ce1dacb435460dda1f9d453eaaeac44bd502aca4': rl2: Avoid a division by zero wtv: Add more sanity checks for a length read from the file segafilm: Validate the number of audio channels qpeg: Add checks for running out of rows in qpeg_decode_inter mpegaudiodec: Validate that the number of channels fits at the given offset asvdec: Verify the amount of extradata idroqdec: Make sure a video stream has been allocated before returning packets rv10: Validate the dimensions set from the container xmv: Add more sanity checks for parameters read from the bitstream ffv1: Make sure at least one slice context is initialized truemotion2: Use av_freep properly in an error path eacmv: Make sure a reference frame exists before referencing it mpeg4videodec: Check the width/height in mpeg4_decode_sprite_trajectory ivi_common: Make sure color planes have been initialized mov: Don't use a negative duration for setting other fields Conflicts: libavcodec/eacmv.c libavcodec/ffv1.c libavcodec/mpeg4videodec.c libavcodec/mpegaudiodec.c libavcodec/qpeg.c libavformat/mov.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ivi_common.c')
-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 60bb9a2533..d8b5e00a6a 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -969,6 +969,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;