From eb57119f90b0fc1042d5b9ac6e0032fd4733d65b Mon Sep 17 00:00:00 2001 From: Christophe Massiot Date: Thu, 26 May 2005 13:40:35 +0000 Subject: [PATCH] * modules/video_filter/mosaic.c: Fixed a major bug with video/audio synchro. --- modules/video_filter/mosaic.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/video_filter/mosaic.c b/modules/video_filter/mosaic.c index 34c6d11bf6..20e5da9c7b 100644 --- a/modules/video_filter/mosaic.c +++ b/modules/video_filter/mosaic.c @@ -391,10 +391,11 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date ) video_format_t fmt_in = {0}, fmt_out = {0}; picture_t *p_converted; - if ( p_es->b_empty || p_es->p_picture == NULL ) + if ( p_es->b_empty ) continue; - if ( p_es->p_picture->date + p_sys->i_delay < date ) + while ( p_es->p_picture != NULL + && p_es->p_picture->date + p_sys->i_delay < date ) { if ( p_es->p_picture->p_next != NULL ) { @@ -409,14 +410,20 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date ) p_es->p_picture->pf_release( p_es->p_picture ); p_es->p_picture = NULL; p_es->pp_last = &p_es->p_picture; - continue; + break; } else + { msg_Dbg( p_filter, "too late picture for %s (" I64Fd ")", p_es->psz_id, date - p_es->p_picture->date - p_sys->i_delay ); + break; + } } + if ( p_es->p_picture == NULL ) + continue; + if ( p_sys->i_order_length == 0 ) { i_real_index++; -- 2.39.2