[vlc-devel] [PATCH 4/5] stream_ReadLine: support arbitrary length limit

Romain Vimont rom1v at videolabs.io
Tue Sep 8 16:05:49 CEST 2020


On Tue, Sep 08, 2020 at 03:56:43PM +0200, Pierre Ynard via vlc-devel wrote:
> Date: Tue, 8 Sep 2020 15:56:43 +0200
> From: Pierre Ynard <linkfanel at yahoo.fr>
> To: vlc-devel at videolan.org
> Subject: Re: [vlc-devel] [PATCH 4/5] stream_ReadLine: support arbitrary
>  length limit
> User-Agent: Mutt/1.5.23 (2014-03-12)

Sorry, I didn't followed the whole discussion, so I have no strong
opinion on how to solve the youtube script issue, but just a little
question about that point:

> > Thus, in most cases, you don't actually need the lines, and in some of
> > the cases (like anevia_streams), reading line by line could break the
> > parsing because an item could be written like
> >
> >    <input
> >       name="..">
> >
> > or
> >
> >    <INPUT NAME="...">
> >
> > or
> >
> >    < input name="" >
> >
> > etc, while a more specialized parser would not fail on such issue.
>
> Yes indeed, that is true. However as I said previously, the reality is
> that in my experience it's never been a practical issue. Even when that
> happens, it's always possible to manually call readline() again after
> anchoring on the beginning of the tag; some scripts do that.

In that case, a readchunk() returning (for example) 4Kb regardless of
line separation should also work, shouldn't it? (the script would just
have to call readchunk() again after anchoring on the beginning of the
tag)

Regards


More information about the vlc-devel mailing list