Commit 8bcf5840 authored by Timo Rothenpieler's avatar Timo Rothenpieler

avcodec/nvdec: fix return value on error

parent 538de435
......@@ -414,8 +414,10 @@ int ff_nvdec_start_frame(AVCodecContext *avctx, AVFrame *frame)
return AVERROR(ENOMEM);
cf->decoder_ref = av_buffer_ref(ctx->decoder_ref);
if (!cf->decoder_ref)
if (!cf->decoder_ref) {
ret = AVERROR(ENOMEM);
goto fail;
}
cf->idx_ref = av_buffer_pool_get(ctx->decoder_pool);
if (!cf->idx_ref) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment