mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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).
Merges Libav commit 086321c612
.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
39f201a0ec
commit
1509d739a0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user