[vlc-commits] decoder: fix out_pool NULL deref
Thomas Guillem
git at videolan.org
Tue Mar 10 17:14:20 CET 2020
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 10 08:56:00 2020 +0100| [fa3e6c11da19643f77e76c6c73ca898313f70512] | committer: Thomas Guillem
decoder: fix out_pool NULL deref
Once the format is configured, a decoder module can request new picture_t via
decoder_NewPicture() asynchronously. Therefore, the out_pool need to outlive
the decoder module.
This patch fixes a NULL deref from decoder_NewPicture() when the decoder is
being destroyed. Indeed, the module need to be unloaded before the out_pool is
destroyed.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fa3e6c11da19643f77e76c6c73ca898313f70512
---
src/input/decoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index d09a849600..dd47c647c4 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1964,12 +1964,12 @@ static void DeleteDecoder( decoder_t * p_dec )
(char*)&p_dec->fmt_in.i_codec );
const enum es_format_category_e i_cat =p_dec->fmt_in.i_cat;
+ decoder_Clean( p_dec );
if ( p_owner->out_pool )
{
picture_pool_Release( p_owner->out_pool );
p_owner->out_pool = NULL;
}
- decoder_Clean( p_dec );
if (p_owner->vctx)
vlc_video_context_Release( p_owner->vctx );
More information about the vlc-commits
mailing list