summaryrefslogtreecommitdiff
path: root/libavformat/hls.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-10-01 01:34:35 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-10-01 13:51:13 +0200
commit74942685cb457c01937686892878403a409baf27 (patch)
treeef532e82be002d8f6b3014e62b4fb4f66840f996 /libavformat/hls.c
parentd0a3e89d41b05f9ed0e7401c352b60ed4f4d1ed5 (diff)
hls: Check av_opt_set_dict return value as well
Bug-Id: CID 1320426
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r--libavformat/hls.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 467a4913a5..be4720789b 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -220,9 +220,8 @@ static int url_connect(struct variant *var, AVDictionary *opts)
av_dict_copy(&tmp, opts, 0);
- av_opt_set_dict(var->input, &tmp);
-
- if ((ret = ffurl_connect(var->input, NULL)) < 0) {
+ if ((ret = av_opt_set_dict(var->input, &tmp)) < 0 ||
+ (ret = ffurl_connect(var->input, NULL)) < 0) {
ffurl_close(var->input);
var->input = NULL;
}