[FFmpeg-devel] [PATCH] windows: Remove the VS_FFI_FILEFLAGSMASK setting

Martin Storsjö martin at martin.st
Wed Jan 5 14:36:51 EET 2022


On Wed, 5 Jan 2022, Hendrik Leppkes wrote:

> On Wed, Jan 5, 2022 at 1:21 PM Martin Storsjö <martin at martin.st> wrote:
>>
>> According to the documentation, the VS_FFI_FILEFLAGSMASK mask
>> consists of all the following flags set:
>> VS_FF_DEBUG, VS_FF_PATCHED, VS_FF_PRERELEASE, VS_FF_PRIVATEBUILD,
>> VS_FF_SPECIALBUILD.
>>
>> The documentation of these fields say e.g. this:
>> VS_FF_PATCHED      File has been modified and is not identical to the
>>                    original shipping file of the same version number.
>> VS_FF_PRIVATEBUILD File was not built using standard release procedures.
>>                    If this value is given, the StringFileInfo block must
>>                    contain a PrivateBuild string.
>>
>> It doesn't seem like it's intentional to set all of these flags
>> (and setting all of them at once doesn't seem like something one
>> ever would want to do anyway).
>>
>
> FILEFLAGSMASK  sets the flags that are valid, not the flags that are
> actually set - FILEFLAGS would do that.
> So what we are actually doing is telling it all flags are valid, and
> none are set (since FILEFLAGS is not set at all).
>
> As far as I can tell, not specifying FILEFLAGSMASK is identical to
> specifying it with VS_FFI_FILEFLAGSMASK, so either applying or not
> should yield identical information in the binaries.

Oh, sorry, my bad.

Ok then, then I guess the patch description could be this:

---8<---
windows: Remove the unnecessary FILEFLAGSMASK resource version field

This field indicates what fields in FILEFLAGS (which we don't set) are 
valid. As long as we don't have any practical use of the flag, omit it for 
simplicity.
---8<---

(Or then just leave it as is as it's not wrong as I thought.)

// Martin


More information about the ffmpeg-devel mailing list