summaryrefslogtreecommitdiff
path: root/libavcodec/nvdec.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2017-11-12 21:04:57 +0100
committerTimo Rothenpieler <timo@rothenpieler.org>2017-11-13 20:33:10 +0100
commit8bcf5840ea2a6a92c75ab3219f89fe0b8a53cf50 (patch)
tree1fc4ca098873f4e71ceaa83c97c284af03c0a018 /libavcodec/nvdec.c
parent538de4354dcd6c57154c5a5dec0744dcaa06b874 (diff)
avcodec/nvdec: fix return value on error
Diffstat (limited to 'libavcodec/nvdec.c')
-rw-r--r--libavcodec/nvdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c
index 5d65f1d3dd..ac68faca99 100644
--- a/libavcodec/nvdec.c
+++ b/libavcodec/nvdec.c
@@ -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) {