[vlc-devel] [vlc-commits] mux: mp4: fix NALU size endianness
Rémi Denis-Courmont
remi at remlab.net
Tue Mar 17 20:02:07 CET 2015
Le mardi 17 mars 2015, 19:59:57 Francois Cartegnie a écrit :
> Le 17/03/2015 17:17, Rémi Denis-Courmont a écrit :
> >> /* Fix size */
> >> int i_size = dat - &last[4];
> >>
> >> - last[0] = (i_size >> 24)&0xff;
> >> - last[1] = (i_size >> 16)&0xff;
> >> - last[2] = (i_size >> 8)&0xff;
> >> - last[3] = (i_size )&0xff;
> >> + SetDWBE((uint32_t*) last, i_size);
> >
> > That cast is invalid on most platforms except x86.
>
> Except the signed size (<255) to unsigned 32, i don't really see.
You can´t up-cast from 8 to 32-bits alignment.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list