[vlc-commits] lpcm: comment AOB padding values

Jean-Baptiste Kempf git at videolan.org
Wed Dec 7 15:16:39 CET 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Dec  7 10:40:24 2016 +0100| [a183329f0ccdaa29eb91d145c98380af31248f79] | committer: Jean-Baptiste Kempf

lpcm: comment AOB padding values

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a183329f0ccdaa29eb91d145c98380af31248f79
---

 modules/codec/lpcm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/codec/lpcm.c b/modules/codec/lpcm.c
index 801f12e..492426c 100644
--- a/modules/codec/lpcm.c
+++ b/modules/codec/lpcm.c
@@ -816,7 +816,9 @@ static int AobHeader( unsigned *pi_rate,
     if( i_header_size + 3 < LPCM_AOB_HEADER_LEN )
         return VLC_EGENERIC;
 
-    *pi_padding = 3+i_header_size - LPCM_AOB_HEADER_LEN;
+    /* Padding = Total header size - Normal AOB header
+     *         + 3 bytes (1 for continuity counter + 2 for header_size ) */
+    *pi_padding = 3 + i_header_size - LPCM_AOB_HEADER_LEN;
 
     const int i_index_size_g1 = (p_header[6] >> 4) & 0x0f;
     const int i_index_size_g2 = (p_header[6]     ) & 0x0f;



More information about the vlc-commits mailing list