[vlc-devel] [PATCH 1/2/ input core add status field per elementary strean

Rémi Denis-Courmont remi at remlab.net
Sat Feb 15 17:09:25 CET 2014

Le samedi 15 février 2014, 16:46:54 Denis Charmet a écrit :
> Le samedi 15 février 2014 à 05:12:27, Rémi Denis-Courmont a écrit :
> > > I'm surely missing something but why is it not thread-safe?
> > 
> > Did you actually check *where* the p_dec->b_error was read and written?
> > This cannot work.
> Ok, so it's not threadsafe because es_out_Control are called from the
> input thread and p_dec->error is modified inside the decoder thread?

Obviously, yes. b_error is an internal variable of the decoder (thread). You 
cannot access it outside (and even if you could, it would be meaningless since 
the value could change asynchronously).

> > > What's the plan for S/PDIF autodetection?
> > 
> > Decoder handles audio output errors.
> Ok but shouldn't there be a way to notify the core that the decoder
> failed for some reason and won't do anything else than emptying its
> fifo like firing a event or something?

I fail to see what more can the core do about that. There are already an error 
dialog for failed decoding and error logs.

Реми Денис-Курмон

More information about the vlc-devel mailing list