summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Nagy <ronag89@gmail.com>2017-12-04 12:00:13 +0800
committerSteven Liu <lq@chinaffmpeg.org>2017-12-04 12:00:13 +0800
commit31b351ea81d0a7c0d0ed1982dcc6327b7f43b987 (patch)
treef804f8f78f3ff6ddabcb493f234b776d166fbd56
parent894f1c399b5ffae41b44289d23aeead542093006 (diff)
downloadffmpeg-streaming-31b351ea81d0a7c0d0ed1982dcc6327b7f43b987.zip
ffmpeg-streaming-31b351ea81d0a7c0d0ed1982dcc6327b7f43b987.tar.gz
avformat/hlsenc: fix baseurl missing last char
Reviewed-by: Steven Liu <lq@onvideo.cn>
-rw-r--r--libavformat/hlsenc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index cdfbf45..dc8bf48 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1921,14 +1921,11 @@ static int hls_write_header(AVFormatContext *s)
}
if (hls->baseurl) {
- int baseurl_len;
- baseurl_len = strlen(hls->baseurl);
- vs->baseurl = av_malloc(baseurl_len);
+ vs->baseurl = av_strdup(hls->baseurl);
if (!vs->baseurl) {
ret = AVERROR(ENOMEM);
goto fail;
}
- av_strlcpy(vs->baseurl, hls->baseurl, baseurl_len);
}
if ((hls->flags & HLS_SINGLE_FILE) && (hls->segment_type == SEGMENT_TYPE_FMP4)) {
OpenPOWER on IntegriCloud