Commit e65aec1c authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

demux-run: Fix leak when failing to create a decoder

parent e196e7ca
......@@ -80,6 +80,8 @@ static es_out_id_t *EsOutAdd(es_out_t *out, const es_format_t *fmt)
#ifdef HAVE_DECODERS
es_format_Copy(&id->fmt, fmt);
id->decoder = test_decoder_create((void *)out->p_sys, &id->fmt);
if (id->decoder == NULL)
es_format_Clean(&id->fmt);
#endif
debug("[%p] Added ES\n", (void *)id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment