Browse Source

avformat/hls: Check for av_opt_set_dict() failure

Fixes: CID1320426

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8
Michael Niedermayer 10 years ago
parent
commit
4eca1939ef
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavformat/hls.c

+ 3
- 1
libavformat/hls.c View File

@@ -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, 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) {
ffurl_close(pls->input);
pls->input = NULL;
}

fail:
av_dict_free(&tmp);
return ret;
}


Loading…
Cancel
Save