[vlc-commits] commit: ts-mux: repeat sps/pps on keyframes, should fix h264/ ts streaming issues (hopefully) (Ilkka Ollakka )

git at videolan.org git at videolan.org
Sat Jun 26 00:52:16 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Jun 26 01:51:35 2010 +0300| [ae74559c7270c8bc671b6992bf9484341ab23d01] | committer: Ilkka Ollakka 

ts-mux: repeat sps/pps on keyframes, should fix h264/ts streaming issues (hopefully)

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

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

diff --git a/modules/mux/mpeg/pes.c b/modules/mux/mpeg/pes.c
index adeab13..d926af6 100644
--- a/modules/mux/mpeg/pes.c
+++ b/modules/mux/mpeg/pes.c
@@ -341,10 +341,12 @@ int  EStoPES ( sout_instance_t *p_sout, block_t **pp_pes, block_t *p_es,
         i_max_pes_size = PES_PAYLOAD_SIZE_MAX;
     }
 
-    if( p_fmt->i_codec == VLC_CODEC_MP4V &&
+    if( ( p_fmt->i_codec == VLC_CODEC_MP4V ||
+          p_fmt->i_codec == VLC_CODEC_H264 ) &&
         p_es->i_flags & BLOCK_FLAG_TYPE_I )
     {
-        /* For MPEG4 video, add VOL before I-frames */
+        /* For MPEG4 video, add VOL before I-frames,
+           for H264 add SPS/PPS before keyframes*/
         p_es = block_Realloc( p_es, p_fmt->i_extra, p_es->i_buffer );
 
         memcpy( p_es->p_buffer, p_fmt->p_extra, p_fmt->i_extra );



More information about the vlc-commits mailing list