[MPlayer-dev-eng] [PATCH] Add support for directory-wide configuration overrides V1.2

Christian P. Schmidt schmidt at digadd.de
Sun Aug 30 14:04:12 CEST 2009


Reimar Döffinger wrote:
> On Sun, Aug 30, 2009 at 02:24:18PM +0300, Christian P. Schmidt wrote:
>> Reimar Döffinger wrote:
>>> On Sun, Aug 30, 2009 at 12:55:15PM +0200, Reimar Döffinger wrote:
>>>> On Sun, Aug 30, 2009 at 01:26:10PM +0300, Christian P. Schmidt wrote:
>>>>> As for the patch itself, it's pretty straightforward. Only questionable
>>>>> thing is the use of the libgen.h header for the dirname function without
>>>>> checking. However this header conforms to POSIX.1-2001 (see man 3
>>>>> dirname), so I don't think it's an issue.
>>>> It is an issue. That header is already used elsewhere and I think that
>>>> code still can not be used on all platforms MPlayer works otherwise
>>>> (MinGW? Solaris? Don't remember which is the issue).
>>> Ok, it is in stream/stream_dvd.c and used unconditionally, so it
>>> probably doesn't really make things worse, though I remain unhappy about
>>> it.
>> Still it's not hard to do without.
> 
> Only when you do it wrong. It won't work like that on Windows when
> someone uses Windows-paths.
> Though the same logic/bug is already present a few lines down.
> Of course, strictly speaking dirname/basename would either not work for
> that case as well or actually not be compliant...
> Either way, av_strlcpy is preferable over strncpy.

Changed to av_strlcpy, added the avstring.h include. No comments on
Windows from my side, I don't know enough about it from a programmer's
point of view.

Regards,
Christian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dirwide-mplayer-conf.v1.2.patch
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090830/8e8e0fbe/attachment.asc>


More information about the MPlayer-dev-eng mailing list