[vlc-devel] [RFC PATCH 3.0.x] input: clear EOF flags of slave sources when select track
Zhao Zhili
quinkblack at foxmail.com
Sat Nov 14 07:48:37 CET 2020
> 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.
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
More information about the vlc-devel
mailing list