New version of the patch attached to address your comments.
Thanks,
Christian

On Jan 7, 2015, at 2:17 PM, Michael Niedermayer <michae...@gmx.at> wrote:

> Please add a testcase/example to either the documentation or
> commit message

Example added to the commit message.

>> +    ff_get_line(pb, hls->key_uri, sizeof(hls->key_uri));
>> +    hls->key_uri[strcspn(hls->key_uri, "\r\n")] = '\0';
>> +
>> +    ff_get_line(pb, hls->key_file, sizeof(hls->key_file));
>> +    hls->key_file[strcspn(hls->key_file, "\r\n")] = '\0';
>> +
>> +    ff_get_line(pb, hls->iv_string, sizeof(hls->iv_string));
>> +    hls->iv_string[strcspn(hls->iv_string, "\r\n")] = '\0';
> 
> in what case are the strcspn() needed ?

Replaced with terminating character check/replace, and combined with error 
check.

>> +        if (!err)
>> +            snprintf(iv_string, sizeof(iv_string), "%032llx", c->sequence);
> 
> libavformat/hlsenc.c:407:13: warning: format ‘%llx’ expects argument of type 
> ‘long long unsigned int’, but argument 4 has type ‘int64_t’ [-Wformat]
> libavformat/hlsenc.c:407:13: warning: format ‘%llx’ expects argument of type 
> ‘long long unsigned int’, but argument 4 has type ‘int64_t’ [-Wformat]

Replaced with PRIx64 macro.

>> +        filename_size = strlen(prefix) + strlen(oc->filename) + 1;
>> +        filename = av_malloc(filename_size);
>> +        if (!filename) {
>> +            av_dict_free(&options);
>> +            return AVERROR(ENOMEM);
>> +        }
>> +        av_strlcpy(filename, prefix, filename_size);
>> +        av_strlcat(filename, oc->filename, filename_size);
> 
> this looks like it can be simplified with av_asprintf()

Replaced with av_asprintf().

Attachment: 0001-avformat-hlsenc-added-HLS-encryption.patch
Description: 0001-avformat-hlsenc-added-HLS-encryption.patch



_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to