diff options
author | James Almer <jamrial@gmail.com> | 2020-12-13 15:08:13 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2020-12-13 15:50:42 -0300 |
commit | cd821c18dc8bc5949f4b4d13f07157928ae22bba (patch) | |
tree | a0c4daa3a0febe310642129c00ab9eb2fe97aafd /libavcodec/cuviddec.c | |
parent | eadf7e3a59e89a8e26b28608a9617736b334ce85 (diff) |
avcodec/cuviddec: unref output frame on failure
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/cuviddec.c')
-rw-r--r-- | libavcodec/cuviddec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c index 331851231f..49775b5a09 100644 --- a/libavcodec/cuviddec.c +++ b/libavcodec/cuviddec.c @@ -634,6 +634,9 @@ FF_ENABLE_DEPRECATION_WARNINGS } error: + if (ret < 0) + av_frame_unref(frame); + if (mapped_frame) eret = CHECK_CU(ctx->cvdl->cuvidUnmapVideoFrame(ctx->cudecoder, mapped_frame)); |