[vlc-devel] [vlc-commits] mux: mp4: fix NALU size endianness

Rémi Denis-Courmont remi at remlab.net
Tue Mar 17 17:17:06 CET 2015


Le mardi 17 mars 2015, 16:58:50 Francois Cartegnie a écrit :
> vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Mar 17
> 16:57:10 2015 +0100| [5a90ec05189debcb00e27eac048efb89bd50549a] |
> committer: Francois Cartegnie
> 
> mux: mp4: fix NALU size endianness
> 
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a90ec05189debcb00e
> > 27eac048efb89bd50549a
> ---
> 
>  modules/mux/mp4.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c
> index e507eb4..2df8553 100644
> --- a/modules/mux/mp4.c
> +++ b/modules/mux/mp4.c
> @@ -753,10 +753,7 @@ static block_t *ConvertFromAnnexB(block_t *p_block)
> 
>          /* 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.

> 
>          /* Skip blocks with SPS/PPS */
>          //if ((last[4]&0x1f) == 7 || (last[4]&0x1f) == 8)
> 
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list