Le 28 mai 2024 06:07:41 GMT+03:00, James Almer <jamr...@gmail.com> a écrit :
>On 5/27/2024 11:49 PM, Andreas Rheinhardt wrote:
>> These strings are so short that they can be put directly
>> into the containing structure, avoiding the pointer
>> and putting it into .rodata.
>> Also use chars for interlaced and level while at it, as
>> these are so small.
>> 
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
>> ---
>>   libavcodec/vc2enc.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>> 
>> diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c
>> index 3285218724..8b9641916a 100644
>> --- a/libavcodec/vc2enc.c
>> +++ b/libavcodec/vc2enc.c
>> @@ -41,8 +41,9 @@
>>   typedef struct VC2BaseVideoFormat {
>>       enum AVPixelFormat pix_fmt;
>>       AVRational time_base;
>> -    int width, height, interlaced, level;
>> -    const char *name;
>> +    int width, height;
>> +    char interlaced, level;
>
>Use a fixed size type like uint8_t and not char.

The size of `char` is fixed to 8 bits *if* `uint8_t` exists though. It may be 
preferable to pick an explicitly signed or unsigned type still.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to