[vlc-devel] [RFC PATCH 3.0.x] input: clear EOF flags of slave sources when select track

Thomas Guillem thomas at gllm.fr
Mon Nov 16 13:03:54 CET 2020



On Sat, Nov 14, 2020, at 07:48, Zhao Zhili wrote:
> 
> 
> > On Nov 14, 2020, at 2:46 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> > 
> > Le vendredi 13 novembre 2020, 16:06:37 EET Zhao Zhili a écrit :
> >> input-slave was broken for some demuxers like mp4. If no track is
> >> selected, slave demuxer return EOF at the beginning. Selecting
> >> a track of slave input doesn't work since the input source is
> >> in the EOF status. For VLC users, seeking after select track is a
> >> workaround solution, because seek will reset the EOF flag.
> >> 
> >> Since a video track can be enabled at random position and there is
> >> no preroll, it can lead to corrupted frames.
> > 
> > I don't think you can simply undo the EOS flag. AFAIK, demuxers are not 
> > *generally* robust enough to return EOS repeatedly.
> > 
> > Most likely some demuxers return a fatal error or even crash if you try to 
> > demux after EOS (without first seeking). We can agree that that's a bug in any 
> > affected demuxers ... in 4.0. But we can't just decree a change in the API 
> > semantics, without first reviewing the demuxers.
> 
> There are two other methods:
> 1. Trigger SlaveSeek() when selecting track.

If the seek is done only on the EOF slave, then such workaround is OK for me.

> 
> 2. Output all tracks from demuxers and let EsOut drop those unselected 
> track packets.
> Actually, --demux=avformat is another workaround.
> 
> How about the first method for 3.0?
> 
> > 
> > It's unlikely that we can do this in a stable release at all.
> > 
> > -- 
> > Rémi Denis-Courmont
> > 
> > 
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> 
> _______________________________________________
> 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