1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avio: Free URLContext private data allocated via AVOptions

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2011-11-09 00:48:40 +02:00
parent 6c643e0705
commit d10361b658

View File

@ -335,8 +335,11 @@ int ffurl_close(URLContext *h)
#if CONFIG_NETWORK
ff_network_close();
#endif
if (h->prot->priv_data_size)
if (h->prot->priv_data_size) {
if (h->prot->priv_data_class)
av_opt_free(h->priv_data);
av_free(h->priv_data);
}
av_free(h);
return ret;
}