[vlc-devel] [RFC PATCH 1/5] filter: add a way to signal error from callbacks

Thomas Guillem thomas at gllm.fr
Fri Mar 1 12:41:42 CET 2019


On Thu, Feb 28, 2019, at 21:45, Rémi Denis-Courmont wrote:
> Le torstaina 28. helmikuuta 2019, 22.29.55 EET Thomas Guillem a écrit :
> > > And then I don't think filters should be allowed to fail after
> > > initialisation, as it won't typically be possible or reasonable to handle
> > > errors.
> 
> > My last patch of the set really need to make sure we handle filters fails,
> > but yes those fail are very unlikely:
> 
> I just mean that there is not much sane handling about a failing filter.
> 
> If a single block handling fails due to memory allocation error or similar, 
> the block will be discarded. If you really want to be precise, you can flag a 
> discontinuity, report an error in the stat counters and reset the filter 
> internal state.

That is exactly what I wanted to do with this patch. I'll propose a new approach:

 - Add a special discontinuity block that can be returned by any audio filters
 - Handle this special block from src/audio_output/filters.c: when it happens, flush the pipeline and signal the discontinuity to the caller
 - From src/audio_output/dec.c: in case of discontinuity, report an error in the stat counters and invalidate the original_pts (or last_pts)


> 
> -- 
> レミ・デニ-クールモン
> 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