Browse Source

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>
tags/n2.1
Martin Storsjö 12 years ago
parent
commit
a92538b7c0
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/ivi_common.c

+ 5
- 0
libavcodec/ivi_common.c View File

@@ -970,6 +970,11 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
return AVERROR_PATCHWELCOME; 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); ctx->switch_buffers(ctx);


//{ START_TIMER; //{ START_TIMER;


Loading…
Cancel
Save