avcodec/cuviddec: unref output frame on failure

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2020-12-13 15:08:13 -03:00
parent eadf7e3a59
commit cd821c18dc

View File

@ -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));