mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
c1b55cb70c
commit
59f1a46048
|
@ -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…
Reference in New Issue