[FFmpeg-devel] [PATCH] avformat/mov_chan: respect channel order when parsing and creating chan atom
Marton Balint
cus at passwd.hu
Sat Mar 23 13:17:28 EET 2024
On Mon, 18 Mar 2024, Marton Balint wrote:
>
>
> On Mon, 18 Mar 2024, Andreas Rheinhardt wrote:
>
>> Marton Balint:
>>> Previously we always assumed that the channels are in native order, even
>>> if
>>> they were not. The new channel layout API allows us to signal the proper
>>> channel order, so let's do so.
>>>
>>> Fixes ticket #98.
>>> ---
>>> libavformat/mov_chan.c | 464 +++++++++++++++++++----------------------
>>> 1 file changed, 211 insertions(+), 253 deletions(-)
>>>
[...]
>>> +#define TAG(_0) (struct
>>> MovChannelLayoutMap){.tag = _0}
>>> +#define ID(_0) (struct
>>> MovChannelLayoutMap){.id = c_##_0}
>>
>> Code like
>>
>> typedef struct Foo {
>> int a;
>> } Foo;
>>
>> Foo bar[] = {
>> (Foo) {.a = 1},
>> };
>>
>> is not valid C11 (or C17), because initializers for static objects are
>> subject to severe restrictions; in particular, compound literals are not
>> allowed. GCC and Clang ignore this except when using -pedantic, but MSVC
>> does not: https://godbolt.org/z/hvnrh63za
>> Just remove the "(MovChannelLayoutMap)".
>
> Ok, will do, thanks.
Will apply.
Regards,
Marton
More information about the ffmpeg-devel
mailing list