[vlc-devel] [PATCH] Don't flag as preroll blocks with invalid pts and dts

Denis Charmet typx at dinauz.org
Sat Jan 14 20:22:55 CET 2012


This behaviour causes #5165 as when mkv has several audio frame in
a lace only the first has a valid pts. The other frames have to have
a VLC_TS_INVALID pts and dts and it's up to the decoder to extrapolate
the real values.

Fix #5165.
---
 src/input/es_out.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 89bff72..a2a21c7 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1952,7 +1952,7 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
         if( p_block->i_pts <= VLC_TS_INVALID )
             i_date = p_block->i_dts;
 
-        if( i_date < p_sys->i_preroll_end )
+        if( i_date > VLC_TS_INVALID && i_date < p_sys->i_preroll_end )
             p_block->i_flags |= BLOCK_FLAG_PREROLL;
     }
 
-- 
1.7.8.3




More information about the vlc-devel mailing list