]> git.sesse.net Git - vlc/commitdiff
mux: mp4: fix NALU size endianness
authorFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 17 Mar 2015 15:57:10 +0000 (16:57 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 17 Mar 2015 15:58:14 +0000 (16:58 +0100)
modules/mux/mp4.c

index e507eb47f7fc7d8a923fd18118621ab6082fd541..2df85538e74bc843836338a506910c9d73d1b01c 100644 (file)
@@ -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);
 
         /* Skip blocks with SPS/PPS */
         //if ((last[4]&0x1f) == 7 || (last[4]&0x1f) == 8)