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

Ilkka Ollakka git at videolan.org
Mon Sep 25 11:16:03 CEST 2017


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Sep 22 14:06:25 2017 +0300| [41e1fa53184a3efcbf36e56faa6b46a1115b07f2] | committer: Ilkka Ollakka

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.

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

 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;
         }



More information about the vlc-commits mailing list