diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2017-11-12 23:04:57 +0300 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2017-11-13 22:33:10 +0300 |
commit | 8bcf5840ea2a6a92c75ab3219f89fe0b8a53cf50 (patch) | |
tree | 1fc4ca098873f4e71ceaa83c97c284af03c0a018 /libavcodec/nvdec.c | |
parent | 538de4354dcd6c57154c5a5dec0744dcaa06b874 (diff) |
avcodec/nvdec: fix return value on error
Diffstat (limited to 'libavcodec/nvdec.c')
-rw-r--r-- | libavcodec/nvdec.c | 4 |
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) { |