[FFmpeg-devel] [PATCH 02/14] avformat/matroska: clean the structure formatting

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Fri Apr 3 20:18:16 EEST 2020


Steve Lhomme:
> On 2020-03-25 23:24, Andreas Rheinhardt wrote:
>> Steve Lhomme:
>>> From: Steve Lhomme <robux4 at ycbcr.xyz>
>>>
>>> Always use a comma at the end, order elements by value.
>>> ---
>>>   libavformat/matroska.h | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/libavformat/matroska.h b/libavformat/matroska.h
>>> index 9e33e51c94..e177cd027f 100644
>>> --- a/libavformat/matroska.h
>>> +++ b/libavformat/matroska.h
>>> @@ -286,13 +286,13 @@ typedef enum {
>>>   typedef enum {
>>>       MATROSKA_VIDEO_INTERLACE_FLAG_UNDETERMINED = 0,
>>>       MATROSKA_VIDEO_INTERLACE_FLAG_INTERLACED   = 1,
>>> -    MATROSKA_VIDEO_INTERLACE_FLAG_PROGRESSIVE  = 2
>>> +    MATROSKA_VIDEO_INTERLACE_FLAG_PROGRESSIVE  = 2,
>>>   } MatroskaVideoInterlaceFlag;
>>>     typedef enum {
>>>       MATROSKA_VIDEO_FIELDORDER_PROGRESSIVE  = 0,
>>> -    MATROSKA_VIDEO_FIELDORDER_UNDETERMINED = 2,
>>>       MATROSKA_VIDEO_FIELDORDER_TT           = 1,
>>> +    MATROSKA_VIDEO_FIELDORDER_UNDETERMINED = 2,
>>>       MATROSKA_VIDEO_FIELDORDER_BB           = 6,
>>>       MATROSKA_VIDEO_FIELDORDER_TB           = 9,
>>>       MATROSKA_VIDEO_FIELDORDER_BT           = 14,
>>>
>> Would it actually be allowed to add new values to the range of
>> FlagInterlaced (to which the MatroskaVideoInterlaceFlag enum
>> corresponds)? If no, then we should not add a comma, as this signals
>> extensibility.
>> The reordering looks good either way.
> 
> Yes, dependending on the DocType version it might be possible that some
> new values are added to enums (not just this one).
> 
> Also I'm not sure I can tell an element in the last of an "list" in XSLT
> so that would be more trouble to generate the code.

Applied.

- Andreas


More information about the ffmpeg-devel mailing list