[vlc-commits] ADTS frame length includes the ADTS header

Rafaël Carré git at videolan.org
Sat Mar 3 21:27:16 CET 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sat Mar  3 15:26:48 2012 -0500| [925762bc4ceb8153b486e22d330b3e3572e6c4df] | committer: Rafaël Carré

ADTS frame length includes the ADTS header

http://wiki.multimedia.cx/index.php?title=ADTS

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

 modules/mux/mpeg/ts.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index cd21b8a..2555951 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -1591,7 +1591,7 @@ static block_t *Add_ADTS( block_t *p_data, es_format_t *p_fmt )
     if( !p_data || p_fmt->i_extra < 2 || !p_extra )
         return p_data; /* no data to construct the headers */
 
-    size_t frame_length = p_data->i_buffer;
+    size_t frame_length = p_data->i_buffer + ADTS_HEADER_SIZE;
     int i_index = ( (p_extra[0] << 1) | (p_extra[1] >> 7) ) & 0x0f;
     int i_profile = (p_extra[0] >> 3) - 1; /* i_profile < 4 */
 



More information about the vlc-commits mailing list