--- libavformat/hls.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/libavformat/hls.c b/libavformat/hls.c index c16c770..a5073ff 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1317,10 +1317,14 @@ static int save_avio_options(AVFormatContext *s) while (*opt) { if (av_opt_get(s->pb, *opt, AV_OPT_SEARCH_CHILDREN, &buf) >= 0) { - ret = av_dict_set(&c->avio_opts, *opt, buf, - AV_DICT_DONT_STRDUP_VAL); - if (ret < 0) - return ret; + if (strlen(buf)) { + ret = av_dict_set(&c->avio_opts, *opt, buf, + AV_DICT_DONT_STRDUP_VAL); + if (ret < 0) + return ret; + } else { + av_free(buf); + } } opt++; } -- 2.5.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel