[vlc-devel] [PATCH] stream_ReadLine: increase line length limit

Pierre Ynard linkfanel at yahoo.fr
Wed Jul 29 18:26:04 CEST 2020

> There also can be no newline at all.

Then it either hits the limit, or it returns that last line when it hits

> vlclua_stream_readline for those uses should be replaced by proper
> stream format/node parsers with callbacks.
> We already have json code & xml, that will imply new lua mappings and
> rewriting the call code.
> A low cost option is not to use Readline at all but read as binary and
> tokenize in lua.

I already explored and addressed why this is intractable in

Even if putting in all the work to use the XML/JSON parser approach,
it's not realistically cost-effective to avoid the very-long-line

So essentially, it takes a lot of work, doesn't even solve the main
issue, and merely moves it outside of the core. Again, this is the
recurring anti-pattern we have with lua maintenance: externalizing the
crap into the lua modules and even preferably into the lua scripts, in
an attempt to let the core remain neat and clean.

I cannot stress enough that the only problem that tokenizing binary
within lua addresses and solves, is the difficulty of merging into the
core the changes required to properly support lua features and use
cases. Do you think this is a real issue?

Either way, guess what: I don't want that redundant, duplicated
and unfactorizable awkward binary buffering crap externalized into
the lua scripts I maintain either. And just handling it within
vlclua_{demux,stream}_readline would be a solution orders of magnitude
more sensible.

Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."

More information about the vlc-devel mailing list