Thanks for your comments. I have uploaded new patchset v4 with suggested 
Please ignore patchset v3.

On 11/24/17, 4:26 PM, "Mark Thompson" <> wrote:
>> +    s = x264_encoder_headers(x4->enc, &nal, &nnal);
>> +    avctx->profile = nal->p_payload[5];
>AVCodecContext.profile should include some of the constraint_set_flags - see 
Great! I was not aware of this. This would also resolve my constraint_set_flags 
problem in hlsenc.
>> +    avctx->level = nal->p_payload[7];
>I don't much like the hard-coding of the offsets here.  Maybe add some asserts 
>so that it fails very quickly if something ever changes?  (I don't think it 
>will with libx264, but if it does then this is going to be putting nonsense in 
>the metadata.)
Have added asserts to check start code and nal type.
>> -        s = x264_encoder_headers(x4->enc, &nal, &nnal);
>> +    if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
>>          avctx->extradata = p = av_mallocz(s + AV_INPUT_BUFFER_PADDING_SIZE);
>>          if (!p)
>>              return AVERROR(ENOMEM);
>I think I preferred the version which only wrote the value if it isn't already 
>set.  If the user specifies a profile then it should use that or fail.
I am ok with both approaches. Let us take a final decision on this based on the 
result of the other patch submitted by carl.


ffmpeg-devel mailing list

Reply via email to