[FFmpeg-cvslog] hls: Check av_opt_set_dict return value as well

Luca Barbato git at videolan.org
Sat Oct 3 12:43:32 CEST 2015


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Thu Oct  1 01:34:35 2015 +0200| [74942685cb457c01937686892878403a409baf27] | committer: Luca Barbato

hls: Check av_opt_set_dict return value as well

Bug-Id: CID 1320426

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=74942685cb457c01937686892878403a409baf27
---

 libavformat/hls.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 467a491..be47207 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;
     }



More information about the ffmpeg-cvslog mailing list