[FFmpeg-devel] [PATCH 2/3] avcodec/libx264:setting profile and level in avcodec context

Jeyapal, Karthick kjeyapal at akamai.com
Fri Nov 24 04:44:53 EET 2017



On 11/23/17, 8:34 PM, "Carl Eugen Hoyos" <ceffmpeg at gmail.com> wrote:

>2017-11-23 13:56 GMT+01:00 Jeyapal, Karthick <kjeyapal at akamai.com>:
>>
>> On 11/23/17, 5:33 PM, "Carl Eugen Hoyos" <ceffmpeg at gmail.com> wrote:
>>
>>>2017-11-23 12:47 GMT+01:00 Jeyapal, Karthick <kjeyapal at akamai.com>:
>>>> On 11/23/17, 4:21 PM, "Carl Eugen Hoyos" <ceffmpeg at gmail.com> wrote:
>>>>
>>>>>2017-11-23 4:37 GMT+01:00  <vdixit at akamai.com>:
>>>>
>>>>>> +    s = x264_encoder_headers(x4->enc, &nal, &nnal);
>>>>>> +    if (avctx->profile == FF_PROFILE_UNKNOWN)
>>>>>> +        avctx->profile = nal->p_payload[5];
>>>>>> +    if (avctx->level == FF_LEVEL_UNKNOWN)
>>>>>> +        avctx->level = nal->p_payload[7];
>>>>>
>>>>>Why are these conditional?
>>>> We didn’t want to overwrite profile and level, if user had already set it.
>>>
>>>So if x264 changes these values because of contradicting user
>>>requests, we write the wrong values into the hls header?
>>
>> Yes, that is true.
>
>> We were afraid to set profile and level unconditionally, because we
>> thought it could get rejected by maintainers
>
>Very smart, you have learned quickly!
Oh yeah :) Quite a learning experience working with you folks!
>(I wish that wouldn't be the message we send to new contributors...)
>
>> (due to that comment in avcodec.h).
>
>I sent a patch.
Thanks.
>
>> Now, if you suggest us to remove those conditions, we would be
>> happy to do it.
>
>I believe other encoders already overwrite it and I believe in this
>case it would be a particularly bad idea not to overwrite it.
Sure. Will do it.

Regards,
Karthick




More information about the ffmpeg-devel mailing list