[vlc-devel] [PATCH] sout: file: truncate path if too long

Rémi Denis-Courmont remi at remlab.net
Mon Dec 16 17:18:19 CET 2019

Le maanantaina 16. joulukuuta 2019, 16.57.59 EET Thomas Guillem a écrit :
> This fixes sout chain fail when the input path/url was too long. This can
> easily happen when the source is a network url that can be longer than local
> pathes.

On one hand, I doubt that the ENAMETOOLONG is generally reliably returned, and 
NAME_MAX is definitely not reliable either. On the other hand, again, software 
must not change an explicitly provided filename - and lets not even get into 
consistency issues, as it's far from the only place that "suffers" from this 
"problem", which really is a feature.

And as François noted already, the end of the file name is probably the worst 
possible part to cut off, as that's typically the discriminant in a series.

It looks to me that this belongs where filename_sanitize() is used, not in the 
stream output.


More information about the vlc-devel mailing list