Commit eb57119f authored by Christophe Massiot's avatar Christophe Massiot

* modules/video_filter/mosaic.c: Fixed a major bug with video/audio synchro.

parent d7b6f81c
...@@ -391,10 +391,11 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date ) ...@@ -391,10 +391,11 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
video_format_t fmt_in = {0}, fmt_out = {0}; video_format_t fmt_in = {0}, fmt_out = {0};
picture_t *p_converted; picture_t *p_converted;
if ( p_es->b_empty || p_es->p_picture == NULL ) if ( p_es->b_empty )
continue; 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 ) if ( p_es->p_picture->p_next != NULL )
{ {
...@@ -409,14 +410,20 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date ) ...@@ -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->pf_release( p_es->p_picture );
p_es->p_picture = NULL; p_es->p_picture = NULL;
p_es->pp_last = &p_es->p_picture; p_es->pp_last = &p_es->p_picture;
continue; break;
} }
else else
{
msg_Dbg( p_filter, "too late picture for %s (" I64Fd ")", msg_Dbg( p_filter, "too late picture for %s (" I64Fd ")",
p_es->psz_id, p_es->psz_id,
date - p_es->p_picture->date - p_sys->i_delay ); 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 ) if ( p_sys->i_order_length == 0 )
{ {
i_real_index++; i_real_index++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment