[FFmpeg-devel] patch for allowing x264 to have global and repeating local headers

aviad rozenhek aviadr1
Thu Nov 20 19:22:24 CET 2008


useful if you want to have a global header, but also local headers to enable
streaming from arbitrary location

Index: libx264.c
===================================================================
--- libx264.c (revision 15883)
+++ libx264.c (working copy)
@@ -263,9 +263,9 @@

     x4->params.b_interlaced = avctx->flags & CODEC_FLAG_INTERLACED_DCT;

-    if(avctx->flags & CODEC_FLAG_GLOBAL_HEADER){
-        x4->params.b_repeat_headers = 0;
-    }
+    x4->params.b_repeat_headers =
+        !(avctx->flags & CODEC_FLAG_GLOBAL_HEADER)||
+        (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER);

     x4->enc = x264_encoder_open(&x4->params);
     if(!x4->enc)




More information about the ffmpeg-devel mailing list