ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Sat 
Sep  5 14:21:47 2015 +0200| [4eca1939ef0614d0959fffb93f93d44af6740e8c] | 
committer: Michael Niedermayer

avformat/hls: Check for av_opt_set_dict() failure

Fixes: CID1320426

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

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

 libavformat/hls.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 82dd744..c16c770 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -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;
 }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to