diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-15 13:24:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-15 13:45:36 +0200 |
commit | 8e4ecd8774d0841140d4e52e84f6f196c7a7dcfc (patch) | |
tree | 244589ac1db6d35971da0faebd05c85d74d05b38 /libavcodec/indeo5.c | |
parent | e3b13c108160869a2dddd1d5bfd42b0b9c917d43 (diff) | |
parent | 28dda8a691f1c723a4a9365ab85f9625f1330096 (diff) | |
download | ffmpeg-8e4ecd8774d0841140d4e52e84f6f196c7a7dcfc.tar.gz |
Merge commit '28dda8a691f1c723a4a9365ab85f9625f1330096'
* commit '28dda8a691f1c723a4a9365ab85f9625f1330096':
indeo: Sanitize ff_ivi_init_planes fail paths
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo5.c')
-rw-r--r-- | libavcodec/indeo5.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c index d907ac48f1..5e3259aa52 100644 --- a/libavcodec/indeo5.c +++ b/libavcodec/indeo5.c @@ -113,7 +113,7 @@ static int decode_gop_header(IVI45DecContext *ctx, AVCodecContext *avctx) } /* check if picture layout was changed and reallocate buffers */ - if (ivi_pic_config_cmp(&pic_conf, &ctx->pic_conf)) { + if (ivi_pic_config_cmp(&pic_conf, &ctx->pic_conf) || ctx->gop_invalid) { result = ff_ivi_init_planes(ctx->planes, &pic_conf); if (result < 0) { av_log(avctx, AV_LOG_ERROR, "Couldn't reallocate color planes!\n"); @@ -327,9 +327,9 @@ static int decode_pic_hdr(IVI45DecContext *ctx, AVCodecContext *avctx) ctx->frame_num = get_bits(&ctx->gb, 8); if (ctx->frame_type == FRAMETYPE_INTRA) { - ctx->gop_invalid = 1; if ((ret = decode_gop_header(ctx, avctx)) < 0) { av_log(avctx, AV_LOG_ERROR, "Invalid GOP header, skipping frames.\n"); + ctx->gop_invalid = 1; return ret; } ctx->gop_invalid = 0; |