[vlc-devel] [PATCH] libmp4: add macro MP4_GET4or8BYTES
Frederic YHUEL
fyhuel at viotech.net
Tue Mar 27 16:42:34 CEST 2012
On Tue, Mar 27, 2012 at 4:30 PM, Robert Forsman
<bob.forsman at ericsson.com> wrote:
> On Tue, 27 Mar 2012 05:22:02 -0400
> Frédéric Yhuel <fyhuel at viotech.net> wrote:
>
>> ---
>> modules/demux/mp4/libmp4.c | 114 ++++++++++++++------------------------------
>> 1 files changed, 36 insertions(+), 78 deletions(-)
>>
>> diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
>> index e921398..a25da8d 100644
>> --- a/modules/demux/mp4/libmp4.c
>> +++ b/modules/demux/mp4/libmp4.c
>> @@ -61,6 +61,12 @@ static inline size_t mp4_box_headersize( MP4_Box_t *p_box )
>> #define MP4_GETFOURCC( dst ) MP4_GETX_PRIVATE( dst, \
>> VLC_FOURCC(p_peek[0],p_peek[1],p_peek[2],p_peek[3]), 4)
>>
>> +#define MP4_GET4or8BYTES( dst ) \
>> + if( (i_version) == 0 ) \
>> + MP4_GET4BYTES( dst ); \
>> + else \
>> + MP4_GET8BYTES( dst ); \
>> +
>
>
> While that patch makes the code more compact, I am concerned that it
> affects readability of the code. As sprawling as the previous version
> was, it matched up better with ISO 14496-12 section 8.2.2.2's syntax
> specification.
>
Actually it's an idea of our beloved president. IMO this is a good
idea, I don't think it affects much the readability of the code... but
I don't really care :-)
--
Frédéric
More information about the vlc-devel
mailing list