diff options
author | Robert Nagy <ronag89@gmail.com> | 2017-12-04 12:00:13 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2017-12-04 12:00:13 +0800 |
commit | 31b351ea81d0a7c0d0ed1982dcc6327b7f43b987 (patch) | |
tree | f804f8f78f3ff6ddabcb493f234b776d166fbd56 /libavformat/hlsenc.c | |
parent | 894f1c399b5ffae41b44289d23aeead542093006 (diff) | |
download | ffmpeg-streaming-31b351ea81d0a7c0d0ed1982dcc6327b7f43b987.zip ffmpeg-streaming-31b351ea81d0a7c0d0ed1982dcc6327b7f43b987.tar.gz |
avformat/hlsenc: fix baseurl missing last char
Reviewed-by: Steven Liu <lq@onvideo.cn>
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r-- | libavformat/hlsenc.c | 5 |
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)) { |