[FFmpeg-cvslog] hwcontext_d3d11va: fix crash on frames_init failure
wm4
git at videolan.org
Mon Nov 6 23:34:48 EET 2017
ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Thu Jun 22 14:52:54 2017 +0200| [086321c612185469ebb85a1887527c8915b488b7] | committer: Luca Barbato
hwcontext_d3d11va: fix crash on frames_init failure
It appears in this case, frames_ininit is called twice (once by
av_hwframe_ctx_init(), and again by unreffing the frames ctx ref).
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=086321c612185469ebb85a1887527c8915b488b7
---
libavutil/hwcontext_d3d11va.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c
index 5432dd8b51..0b36a563f1 100644
--- a/libavutil/hwcontext_d3d11va.c
+++ b/libavutil/hwcontext_d3d11va.c
@@ -104,9 +104,11 @@ static void d3d11va_frames_uninit(AVHWFramesContext *ctx)
if (frames_hwctx->texture)
ID3D11Texture2D_Release(frames_hwctx->texture);
+ frames_hwctx->texture = NULL;
if (s->staging_texture)
ID3D11Texture2D_Release(s->staging_texture);
+ s->staging_texture = NULL;
}
static void free_texture(void *opaque, uint8_t *data)
More information about the ffmpeg-cvslog
mailing list