[FFmpeg-devel] [PATCH] avformat/ffrtmpcrypt: Fix int-conversion warning

Martin Storsjö martin at martin.st
Thu Jan 4 14:47:08 EET 2024


On Fri, 22 Dec 2023, Frank Plowman wrote:

> Hi Martin,
>
> Thanks for the review.
>
> On 22/12/2023 12:15, Martin Storsjö wrote:
>> The change LGTM, but the wording here is slightly confusing IMO. The 
>> problem isn't with using per se AVERROR, that's just a macro for generating 
>> suitable integers, the issue is more about the fact that we're returning 
>> from a macro, without knowing the actual context where the macro is 
>> invoked.
>> 
>> WDYT about this wording?
>> 
>>> The gcrypt definition of `bn_new` used to use the return statement on 
>>> errors, with an AVERROR return value, regardless of the signature of the 
>>> function where the macro is used - it is called in `dh_generate_key` and 
>>> `ff_dh_init` which return pointers. As a result, compiling with gcrypt and 
>>> the ffrtmpcrypt protocol resulted in an int-conversion warning. GCC 14 may 
>>> upgrade these to errors [1].
>
> Yeah this is better, I agree.

Pushed now, thanks for the patch!

// Martin


More information about the ffmpeg-devel mailing list