mimic: Always return on failure

Bug-Id: 905
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Luca Barbato 2015-11-01 04:07:46 +01:00
parent 452d659aa4
commit 4a32692338
1 changed files with 2 additions and 3 deletions

View File

@ -431,11 +431,10 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
res = decode(ctx, quality, num_coeffs, !is_pframe); res = decode(ctx, quality, num_coeffs, !is_pframe);
ff_thread_report_progress(&ctx->frames[ctx->cur_index], INT_MAX, 0); ff_thread_report_progress(&ctx->frames[ctx->cur_index], INT_MAX, 0);
if (res < 0) { if (res < 0) {
if (!(avctx->active_thread_type & FF_THREAD_FRAME)) { if (!(avctx->active_thread_type & FF_THREAD_FRAME))
ff_thread_release_buffer(avctx, &ctx->frames[ctx->cur_index]); ff_thread_release_buffer(avctx, &ctx->frames[ctx->cur_index]);
return res; return res;
} }
}
if ((res = av_frame_ref(data, ctx->frames[ctx->cur_index].f)) < 0) if ((res = av_frame_ref(data, ctx->frames[ctx->cur_index].f)) < 0)
return res; return res;