[MPlayer-dev-eng] [PATCH] demuxer-independent sub and audio track selection

Evgeniy Stepanov eugeni.stepanov at gmail.com
Mon Feb 25 21:22:15 CET 2008


On Monday 25 February 2008 22:09:14 Uoti Urpala wrote:
> On Mon, 2008-02-25 at 19:41 +0100, Reimar Döffinger wrote:
> > Second, this IMO is not "two lines of standard code vs a nonstandard
> > function" but "two lines of code, out of which most new submitters forget
> > one and get the other wrong vs. a function that behaves as most expect
> > the standard one to behave".
>
> The standard string handling functions (and C strings in general) do
> suck, but such new submitters won't be familiar with custom functions
> either. If MPlayer was doing more nontrivial string handling then I'd be
> more supportive of having custom string functions (and possibly a custom
> string type), but in most parts string handling is rather limited now.
>
> > The corollary being that not strongly discouraging strncpy tends to mean
> > more work for both patch submitters and reviewers.
>
> "Remember to ensure 0-termination" is IMO simpler to remember than
> "remember to use av_strlcpy for MPlayer-specific code". And I think
> there aren't that many patches which would use strncpy multiple times.

Oh, I missed that. I'll remove the check from my patch later.

By the way, it seems that the check 'len <= size' at libavutil/string.c:55 is 
always true. Why is it there ? Am I missing anything ?



More information about the MPlayer-dev-eng mailing list