1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

avutil/hwcontext_d3d11va: Free AVD3D11FrameDescriptor on error

Fixes: CID1598558 Resource leak

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Steve Lhomme <robux4@ycbcr.xyz>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cf22f944d5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-06-09 17:47:42 +02:00
parent f55dbd882f
commit ea48c665d1
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -172,6 +172,7 @@ static AVBufferRef *wrap_texture_buf(AVHWFramesContext *ctx, ID3D11Texture2D *te
sizeof(*frames_hwctx->texture_infos));
if (!frames_hwctx->texture_infos) {
ID3D11Texture2D_Release(tex);
av_free(desc);
return NULL;
}
s->nb_surfaces = s->nb_surfaces_used + 1;