mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
avformat/hls: Check for av_opt_set_dict() failure
Fixes: CID1320426 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c41a59330f
commit
4eca1939ef
@ -516,13 +516,15 @@ static int url_connect(struct playlist *pls, AVDictionary *opts, AVDictionary *o
|
|||||||
av_dict_copy(&tmp, opts, 0);
|
av_dict_copy(&tmp, opts, 0);
|
||||||
av_dict_copy(&tmp, opts2, 0);
|
av_dict_copy(&tmp, opts2, 0);
|
||||||
|
|
||||||
av_opt_set_dict(pls->input, &tmp);
|
if ((ret = av_opt_set_dict(pls->input, &tmp)) < 0)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
if ((ret = ffurl_connect(pls->input, NULL)) < 0) {
|
if ((ret = ffurl_connect(pls->input, NULL)) < 0) {
|
||||||
ffurl_close(pls->input);
|
ffurl_close(pls->input);
|
||||||
pls->input = NULL;
|
pls->input = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fail:
|
||||||
av_dict_free(&tmp);
|
av_dict_free(&tmp);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user