[vlc-devel] [RFC PATCH 2/2] decoder: interruptible mwait

Rémi Denis-Courmont remi at remlab.net
Mon Nov 30 18:14:47 CET 2015


On Monday 30 November 2015 18:01:45 Thomas Guillem wrote:
> On Mon, Nov 30, 2015, at 18:00, Thomas Guillem wrote:
> > mwait (called from Audio and SPU DecoderThread) can now be interrupted
> > when
> > flushing or closing.
> > 
> > This fixes a too long closing/flushing time when the next spu or audio
> > block is
> > too distant.
> > ---
> > 
> >  src/input/decoder.c | 34 +++++++++++++++++++++++++++++-----
> >  1 file changed, 29 insertions(+), 5 deletions(-)
> > 
> > diff --git a/src/input/decoder.c b/src/input/decoder.c
> > index 0f08198..314b00f 100644
> > --- a/src/input/decoder.c
> > +++ b/src/input/decoder.c
> > @@ -30,6 +30,7 @@
> > 
> >  # include "config.h"
> >  #endif
> >  #include <assert.h>
> > 
> > +#include <errno.h>
> > 
> >  #include <vlc_common.h>
> > 
> > @@ -107,6 +108,7 @@ struct decoder_owner_sys_t
> > 
> >      bool b_waiting;
> >      bool b_first;
> >      bool b_has_data;
> > 
> > +    bool b_abort_timedwait;
> 
> Maybe b_abort_timedwait can be merged with flushing, but then you have
> to set it to true when closing the decoder.

Well, yes.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list