[vlc-devel] [PATCH 1/5] mp4: prhd, equi, cbmp and st3d boxes have a flag parameter

Adrien Maglo magsoft at videolan.org
Mon Dec 5 11:49:37 CET 2016


Le 05/12/2016 à 11:24, Francois Cartegnie a écrit :
> Le 05/12/2016 à 11:19, Adrien Maglo a écrit :
>>>
>>> Is there any reason for declaring the /data-members/ as |int32_t|,
>>> instead of |uint32_t|?
>>
>> No, good point. I misread the spec.
>
> That's not even a question of sign.
>
> You have both flags and version in those 4 bytes.

Version and flags are really both in these for 4 bytes?
The following declaration

aligned(8) class ProjectionDataBox(unsigned int(32) proj_type, unsigned 
int(32) version, unsigned int(32) flags)
     extends FullBox(proj_type, version, flags) {
}

made me think the last 4 bytes were just for the flags even if it is not 
a definition of "FullBox" itself.

> You just need to check version and flags, if meaningful, according to
> the spec, before decoding. There's no need to store it.

Is this a standard behaviour for MP4 in general? I do not find it 
described in this spec and I do not know what acceptable version numbers 
and flags would be.

Anyway, I have absolutely no strong opinion on this. I am just trying to 
understand. Just let me know what is the best way of fixing the reading 
of those boxes and I will follow your way.

Best regards,


-- 
MagSoft



More information about the vlc-devel mailing list