avcodec/cuviddec: unref output frame on failure

Signed-off-by: James Almer <jamrial@gmail.com>
pull/371/head
James Almer 4 years ago
parent eadf7e3a59
commit cd821c18dc
  1. 3
      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));

Loading…
Cancel
Save