avutil/hwcontext_d3d11va: Fix leak when wrapping texture in AVD3D11FrameDescriptor
authorGreg Wessels <wesselsga@gmail.com>
Sun, 5 Nov 2017 04:43:09 +0000 (23:43 -0500)
committerJames Almer <jamrial@gmail.com>
Wed, 8 Nov 2017 01:56:43 +0000 (22:56 -0300)
Reviewed-by: Aaron Levinson <alevinsn_dev@levland.net>
Signed-off-by: James Almer <jamrial@gmail.com>
libavutil/hwcontext_d3d11va.c

index 52683b9..65dd665 100644 (file)
@@ -123,6 +123,7 @@ static void d3d11va_frames_uninit(AVHWFramesContext *ctx)
 static void free_texture(void *opaque, uint8_t *data)
 {
     ID3D11Texture2D_Release((ID3D11Texture2D *)opaque);
+    av_free(data);
 }
 
 static AVBufferRef *wrap_texture_buf(ID3D11Texture2D *tex, int index)