[vlc-commits] mux: ts: circumvent the stream pcr inaccuracy

Francois Cartegnie git at videolan.org
Thu Jan 12 20:28:02 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jan 12 20:24:44 2017 +0100| [3a214529d522f822d59a83c7f07744a56d62a5ec] | committer: Francois Cartegnie

mux: ts: circumvent the stream pcr inaccuracy

pes_dts is interpolated from data position and
from, sometimes innacurate/incorrect, length which
ends next block being too early by few ms

should avoid most of the too strange dts errors

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

 modules/mux/mpeg/ts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 120ac31..5fa30de 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -1295,7 +1295,7 @@ static bool MuxStreams(sout_mux_t *p_mux )
         if( ( p_pcr_stream->state.i_pes_dts > 0 &&
               p_data->i_dts - 10 * CLOCK_FREQ > p_pcr_stream->state.i_pes_dts +
               p_pcr_stream->state.i_pes_length ) ||
-            p_data->i_dts < p_stream->state.i_pes_dts ||
+            p_data->i_dts + i_shaping_delay < p_stream->state.i_pes_dts ||
             ( p_stream->state.i_pes_dts > 0 &&
               p_input->p_fmt->i_cat != SPU_ES &&
               p_data->i_dts - 10 * CLOCK_FREQ > p_stream->state.i_pes_dts +



More information about the vlc-commits mailing list