From 2713a7228ba300c9a82d8d27189320a6e46d0be1 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Fri, 6 Jun 2008 00:27:35 +0200 Subject: [PATCH] input: Explain a bit more how --auto-adjust-pts-delay works. --- src/input/decoder.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index ce171b8c26..7b882887c2 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -759,7 +759,14 @@ static void optimize_video_pts( decoder_t *p_dec ) * This first draft is way to simple, and we can't say if the * algo will converge. It's also full of constants. * But this simple algo allows to reduce the latency - * to the minimum. */ + * to the minimum. + * The whole point of this, is to bypass the pts_delay set + * by the access but also the delay arbitraly set by + * the remote server. + * Actually the remote server's muxer may set up a + * pts<->dts delay in the muxed stream. That is + * why we may end up in having a negative pts_delay, + * to compensate that artificial delay. */ mtime_t buffer_size = youngest_pict->date - oldest_pict->date; int64_t pts_slide = 0; if( buffer_size < 10000 ) -- 2.39.5