Commit 5512852e authored by Ilkka Ollakka's avatar Ilkka Ollakka

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

(cherry picked from commit ae74559c)
Signed-off-by: default avatarIlkka Ollakka <ileoo@videolan.org>
parent 516bb2b9
...@@ -342,10 +342,12 @@ int EStoPES ( sout_instance_t *p_sout, block_t **pp_pes, block_t *p_es, ...@@ -342,10 +342,12 @@ int EStoPES ( sout_instance_t *p_sout, block_t **pp_pes, block_t *p_es,
i_max_pes_size = PES_PAYLOAD_SIZE_MAX; 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 ) 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 ); 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 ); memcpy( p_es->p_buffer, p_fmt->p_extra, p_fmt->i_extra );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment