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

Zhao Zhili quinkblack at foxmail.com
Mon Nov 16 16:26:23 CET 2020



> On Nov 16, 2020, at 10:59 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> 
> Le lundi 16 novembre 2020, 14:03:54 EET Thomas Guillem a écrit :
>> 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.
> 
> I don't think that would work. In fact, seeking is problematic as it is - 
> because different sources may have different precision.
> 
> But in this case, we *must* seek the demuxer that returned EOF. And IMU, 
> that's the maine one.

I don't get it. The current issue is because slave sources are in EOF state and
can't be selected again. By the way, SlaveSeek() can't fix live sources. It depends
how far can we make input-slave works.

> 
> -- 
> Rémi Denis-Courmont
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel <https://mailman.videolan.org/listinfo/vlc-devel>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201116/b895177f/attachment.html>


More information about the vlc-devel mailing list