[FFmpeg-devel] [PATCH 3/3] avformat/avio: remove 4k limit from avio_printf

Marton Balint cus at passwd.hu
Sat Aug 10 23:41:04 EEST 2019



On Sat, 10 Aug 2019, Nicolas George wrote:

> Marton Balint (12019-08-08):
>> Current 4k limit is definitely causing errors, the users are not aware of
>> it, because it is not intuitive.
>>
>> I don't see why increasing the limit to 2 GB which is something that we will
>> hardly ever hit is worse than current status which causes actual issues.
>>
>> Are you against increasing the limit?
>>
>> Do you want to increase the limit to UINT_MAX (the AVBprint implementation
>> limit) instead of INT_MAX?
>>
>> Or do you have some other suggestion?
>
> Another possibility would be to use AV_BPRINT_SIZE_UNLIMITED (thus
> extending when AVBPrint is extended) but return FFMIN(actual_size,
> INT_MAX).
>
> But in the end, I just said that it felt wrong to have an arbitrary
> limit just because of a return value type. I do not oppose any solution.

Ok, I think I just keep it as is then.

Anther thing that came to my mind is that the great benefit of avio_* 
functions is that the user don't have to check the return value with each 
call. But in order for the user to still be able to detect ENOMEM 
condition we could set the io context error flag to AVERROR(ENOMEM) as 
well, this way it won't get silently ignored.

Regards
Marton


More information about the ffmpeg-devel mailing list