From 41e1fa53184a3efcbf36e56faa6b46a1115b07f2 Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Fri, 22 Sep 2017 14:06:25 +0300 Subject: [PATCH] mux:ts: set h264/hevc/mp2v to be able to produce unbounded pes packets Without unbounded PES packets, h264 streams with big enough packets (keyframes) can cause playback corruption on bottomn of the video in hls streaming when played back with browsers. As frames would be splitted to multiple packets without pts/dts. --- modules/mux/mpeg/ts.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c index 4a4386a249..c3b0d6d33a 100644 --- a/modules/mux/mpeg/ts.c +++ b/modules/mux/mpeg/ts.c @@ -1415,10 +1415,14 @@ static bool MuxStreams(sout_mux_t *p_mux ) p_data->i_pts = p_data->i_dts; } - if( p_input->p_fmt->i_codec == VLC_CODEC_DIRAC ) + if( (p_input->p_fmt->i_codec == VLC_CODEC_DIRAC) || + (p_input->p_fmt->i_codec == VLC_CODEC_H264) || + (p_input->p_fmt->i_codec == VLC_CODEC_HEVC) || + (p_input->p_fmt->i_codec == VLC_CODEC_MP2V) + ) { b_data_alignment = 1; - /* dirac pes packets should be unbounded in + /* dirac and mpeg video pes packets should be unbounded in * length, specify a suitibly large max size */ i_max_pes_size = INT_MAX; }