[FFmpeg-devel] [PATCH] hls: fix baseurl missing last char
Michael Niedermayer
michael at niedermayer.cc
Sat Dec 2 02:59:19 EET 2017
On Fri, Dec 01, 2017 at 11:06:07AM +0100, Robert Nagy wrote:
> ---
> libavformat/hlsenc.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index cdfbf45823..dc8bf48791 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)) {
this looks like a stray linebreak
this wont apply automatically
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171202/87d6f275/attachment.sig>
More information about the ffmpeg-devel
mailing list