avformat/imf: fix bad free() when directory name of the input url is empty
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
(cherry picked from commit 59f1a46048)
This commit is contained in:
parent
5fd7b8e9b2
commit
2186555bc9
1 changed files with 4 additions and 1 deletions
|
|
@ -624,8 +624,11 @@ static int imf_read_header(AVFormatContext *s)
|
|||
tmp_str = av_strdup(s->url);
|
||||
if (!tmp_str)
|
||||
return AVERROR(ENOMEM);
|
||||
c->base_url = av_strdup(av_dirname(tmp_str));
|
||||
av_freep(&tmp_str);
|
||||
if (!c->base_url)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
c->base_url = av_dirname(tmp_str);
|
||||
if ((ret = ffio_copy_url_options(s->pb, &c->avio_opts)) < 0)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue