mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
crypto: Don't manually free memory allocated via AVOptions
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
d10361b658
commit
eaa8c1f9fe
@ -61,7 +61,7 @@ static const AVClass crypto_class = {
|
|||||||
static int crypto_open(URLContext *h, const char *uri, int flags)
|
static int crypto_open(URLContext *h, const char *uri, int flags)
|
||||||
{
|
{
|
||||||
const char *nested_url;
|
const char *nested_url;
|
||||||
int ret;
|
int ret = 0;
|
||||||
CryptoContext *c = h->priv_data;
|
CryptoContext *c = h->priv_data;
|
||||||
|
|
||||||
if (!av_strstart(uri, "crypto+", &nested_url) &&
|
if (!av_strstart(uri, "crypto+", &nested_url) &&
|
||||||
@ -95,10 +95,7 @@ static int crypto_open(URLContext *h, const char *uri, int flags)
|
|||||||
|
|
||||||
h->is_streamed = 1;
|
h->is_streamed = 1;
|
||||||
|
|
||||||
return 0;
|
|
||||||
err:
|
err:
|
||||||
av_freep(&c->key);
|
|
||||||
av_freep(&c->iv);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,8 +154,6 @@ static int crypto_close(URLContext *h)
|
|||||||
if (c->hd)
|
if (c->hd)
|
||||||
ffurl_close(c->hd);
|
ffurl_close(c->hd);
|
||||||
av_freep(&c->aes);
|
av_freep(&c->aes);
|
||||||
av_freep(&c->key);
|
|
||||||
av_freep(&c->iv);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user