[FFmpeg-devel] [PATCH v2 2/2] avformat/dashenc: Option to generate hls playlist as well

Jeyapal, Karthick kjeyapal at akamai.com
Thu Nov 23 04:45:19 EET 2017

On 11/22/17, 9:06 PM, "Michael Niedermayer" <michael at niedermayer.cc> wrote:

>On Wed, Nov 22, 2017 at 02:50:12PM +0530, Karthick J wrote:
>> +static void get_hls_playlist_name(char *playlist_name, const char *base_url, int id) {
>> +    if (base_url)
>> +        sprintf(playlist_name, "%smedia_%d.m3u8", base_url, id);
>> +    else
>> +        sprintf(playlist_name, "media_%d.m3u8", id);
>> +}

>please always use snprint, not sprintf as it can overwrite the array
Thanks for the comments. I have uploaded a new patch(v3) with snprintf.

>Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>Everything should be made as simple as possible, but not simpler.
>-- Albert Einstein


More information about the ffmpeg-devel mailing list