[vlc-devel] [PATCH] decoder: don't set first picture if decoder is flushing

Thomas Guillem thomas at gllm.fr
Fri Jun 5 11:33:09 CEST 2015



On Fri, Jun 5, 2015, at 10:04, Rémi Denis-Courmont wrote:
> Le 2015-06-04 17:29, Thomas Guillem a écrit :
> > This can happen when seeking via http.
> 
> > ---
> >  src/input/decoder.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/input/decoder.c b/src/input/decoder.c
> > index 3fb695f..0b86578 100644
> > --- a/src/input/decoder.c
> > +++ b/src/input/decoder.c
> > @@ -880,7 +880,7 @@ static void DecoderPlayVideo( decoder_t *p_dec,
> > picture_t *p_picture,
> >
> >      bool b_reject = DecoderWaitUnblock( p_dec );
> >
> > -    if( p_owner->b_waiting )
> > +    if( !b_reject && p_owner->b_waiting )
> 
> It would seem reasonable, but I fear this might introduce deadlocks. 
> Did you check the history of that code path?

Yes, it may had been introduced by the commit
d02721a5a8a6653d6c53e2c2be024c495dc265f0

the following test was removed: 
if( p_owner->b_buffering && !p_owner->buffer.b_first )
{
    vlc_mutex_unlock( &p_owner->lock );
    return;
}

(p_owner->b_buffering was moved to p_owner->b_waiting,
p_owner->buffer.b_first was moved to p_owner->b_waiting)

> 
> >      {
> >          assert( p_owner->b_first );
> >          msg_Dbg( p_dec, "Received first picture" );
> 
> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list