[FFmpeg-cvslog] avcodec/nvdec: fix return value on error

Timo Rothenpieler git at videolan.org
Mon Nov 13 21:49:15 EET 2017


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Sun Nov 12 21:04:57 2017 +0100| [8bcf5840ea2a6a92c75ab3219f89fe0b8a53cf50] | committer: Timo Rothenpieler

avcodec/nvdec: fix return value on error

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8bcf5840ea2a6a92c75ab3219f89fe0b8a53cf50
---

 libavcodec/nvdec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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) {



More information about the ffmpeg-cvslog mailing list