[vlc-commits] lpcm: comment AOB padding values

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


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

lpcm: comment AOB padding values

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

 modules/codec/lpcm.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/codec/lpcm.c b/modules/codec/lpcm.c
index 801f12e..6b38abc 100644
--- a/modules/codec/lpcm.c
+++ b/modules/codec/lpcm.c
@@ -371,8 +371,9 @@ static block_t *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
 
     int i_ret;
     unsigned i_channels_padding = 0;
-    unsigned i_padding = 0;
+    unsigned i_padding = 0; /* only for AOB */
     aob_group_t p_aob_group[2];
+
     switch( p_sys->i_type )
     {
     case LPCM_VOB:
@@ -816,7 +817,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