[vlc-devel] [PATCH 1/3] decoder: unblock input thread when interrupted
Thomas Guillem
thomas at gllm.fr
Tue Feb 13 08:43:23 CET 2018
On Mon, Feb 12, 2018, at 19:11, Rémi Denis-Courmont wrote:
> Le maanantaina 12. helmikuuta 2018, 20.03.28 EET Thomas Guillem a écrit :
> > On Mon, Feb 12, 2018, at 18:59, Rémi Denis-Courmont wrote:
> > > Le maanantaina 12. helmikuuta 2018, 19.13.24 EET Thomas Guillem a écrit :
> > > > When not paced, input_DecoderDecode() called from
> > > > (input_thread_t->demux->es_out) can wait for the DecoderThread to empty
> > > > its
> > > > FIFO. This can take a very long time with inputs that need a big
> > > > buffering
> > > > (cf. ACCESS/DEMUX PTS_DELAY) or if sout inputs are blocked in IO.
> > >
> > > No. Using interrupt in decoder thread no sense for the same reasons as
> > > streaming output. In fact, it makes even less sense than in streaming
> > > output, since there is not even much layering going on there.
> >
> > input_ functions on this file are called from the input thread. This new
> > code is used to unblock the input thread, not the decoder one.
>
> The problem that interrupts work around is demuxers pulling data in blocking
> mode. If you push data, no such problems exist. (If you pull in non-blocking
> mode, no such problems exist either.)
>
> By input thread, interrupts were meant only for the demuxers. Specifically,
> interrupts only make sense in demux filters and upstream (demux, stream
> filter, access). Even in access_demux, interrupt does not make too much
> sense, and many access_demux already avoid them properly. So there are no
> reasons for interrupts at ES output and further downstream, because it is all
> push model from ES output onward.
I don't need this patch anymore, but I still believe it can fixes deadlock with input with a big PTS_DELAY and that this is the proper way to do. We can limit this patch to only input_DecoderDecode() when b_do_pace is false, I don't see any possible regression from that.
>
> --
> 雷米‧德尼-库尔蒙
> https://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