[vlc-devel] commit: "Header Extension" is mandatory in asf. (Laurent Aimar )

git version control git at videolan.org
Thu Apr 30 22:19:23 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Apr 29 21:31:47 2009 +0200| [6ec025c7fca988c54a0ce0d186ba53a6bdbcddc7] | committer: Laurent Aimar 

"Header Extension" is mandatory in asf.

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

 modules/mux/asf.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/modules/mux/asf.c b/modules/mux/asf.c
index 600f635..7f252fe 100644
--- a/modules/mux/asf.c
+++ b/modules/mux/asf.c
@@ -910,7 +910,7 @@ static block_t *asf_header_create( sout_mux_t *p_mux, bool b_broadcast )
         }
     }
 
-    i_header_ext_size = i_cm_size ? i_cm_size + 46 : 0;
+    i_header_ext_size = i_cm_size ? i_cm_size + 46 : 46;
     i_size += i_ci_size + i_cd_size + i_header_ext_size ;
 
     if( p_sys->b_asf_http )
@@ -952,14 +952,11 @@ static block_t *asf_header_create( sout_mux_t *p_mux, bool b_broadcast )
     bo_addle_u32( &bo, p_sys->i_bitrate );      /* maxbitrate */
 
     /* header extension */
-    if( i_header_ext_size )
-    {
-        bo_add_guid ( &bo, &asf_object_header_extension_guid );
-        bo_addle_u64( &bo, i_header_ext_size );
-        bo_add_guid ( &bo, &asf_guid_reserved_1 );
-        bo_addle_u16( &bo, 6 );
-        bo_addle_u32( &bo, i_header_ext_size - 46 );
-    }
+    bo_add_guid ( &bo, &asf_object_header_extension_guid );
+    bo_addle_u64( &bo, i_header_ext_size );
+    bo_add_guid ( &bo, &asf_guid_reserved_1 );
+    bo_addle_u16( &bo, 6 );
+    bo_addle_u32( &bo, i_header_ext_size - 46 );
 
     /* metadata object (part of header extension) */
     if( i_cm_size )




More information about the vlc-devel mailing list