stream: call pf_destroy first when deleting stream

This commit is contained in:
Francois Cartegnie 2015-08-29 18:43:18 +02:00
parent 45e9b837df
commit 5b284975a0
1 changed files with 6 additions and 5 deletions

View File

@ -90,14 +90,15 @@ void stream_Delete(stream_t *s)
{
stream_priv_t *priv = (stream_priv_t *)s;
if (priv->text.conv != (vlc_iconv_t)(-1))
vlc_iconv_close(priv->text.conv);
if (priv->peek != NULL)
block_Release(priv->peek);
if (s->pf_destroy != NULL)
s->pf_destroy(s);
if (priv->text.conv != (vlc_iconv_t)(-1))
vlc_iconv_close(priv->text.conv);
if (priv->peek != NULL)
block_Release(priv->peek);
free(s->psz_url);
vlc_object_release(s);
}