[vlc-devel] [PATCH] mux:ts: set h264/hevc/mp2v to be able to produce unbounded pes packets

Ilkka Ollakka ileoo at videolan.org
Fri Sep 22 17:16:12 CEST 2017


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 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 4a4386a249..e02399fa3b 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -1415,7 +1415,11 @@ 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
-- 
2.14.1



More information about the vlc-devel mailing list