|
|
|
@@ -755,11 +755,13 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, |
|
|
|
ctx->frame_size = buf_size; |
|
|
|
|
|
|
|
result = ctx->decode_pic_hdr(ctx, avctx); |
|
|
|
if (result || ctx->gop_invalid) { |
|
|
|
if (result) { |
|
|
|
av_log(avctx, AV_LOG_ERROR, |
|
|
|
"Error while decoding picture header: %d\n", result); |
|
|
|
return -1; |
|
|
|
} |
|
|
|
if (ctx->gop_invalid) |
|
|
|
return AVERROR_INVALIDDATA; |
|
|
|
|
|
|
|
if (ctx->gop_flags & IVI5_IS_PROTECTED) { |
|
|
|
av_log(avctx, AV_LOG_ERROR, "Password-protected clip!\n"); |
|
|
|
@@ -805,8 +807,8 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, |
|
|
|
if (ctx->frame.data[0]) |
|
|
|
avctx->release_buffer(avctx, &ctx->frame); |
|
|
|
|
|
|
|
avcodec_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height); |
|
|
|
ctx->frame.reference = 0; |
|
|
|
avcodec_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height); |
|
|
|
if ((result = avctx->get_buffer(avctx, &ctx->frame)) < 0) { |
|
|
|
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
|
|
|
return result; |
|
|
|
|