[FFmpeg-devel] [PATCH] mov reference files search improvement
Diego Biurrun
diego
Mon Nov 16 11:05:54 CET 2009
On Fri, Sep 25, 2009 at 10:07:19AM +0300, Maksym Veremeyenko wrote:
> Diego Biurrun ???????(??):
> >On Wed, Sep 23, 2009 at 08:48:48AM +0300, Maksym Veremeyenko wrote:
> >>Please, comment, commit or reject.
> >>
> >>--- libavformat/mov.c.step1 2009-09-10 08:47:11.000000000 +0300
> >>+++ libavformat/mov.c 2009-09-18 09:24:41.000000000 +0300
> >>@@ -1542,6 +1542,56 @@
> >>
> >>+ /* find a source dir */
> >>+#ifdef __MINGW32__
> >>+ src_path = FFMAX(strrchr(src, '/'), strrchr(src, '\\'));
> >>+#else
> >>+ src_path = strrchr(src, '/');
> >>+#endif
> >
> >There must be a way to achieve this without ugly #ifdefs.
> There is a way to use *dirname* but according to man:
> /.../
> There is no GNU version of dirname()
> /.../
> and even if will be used it require temporary storage because of:
> /.../
> Both dirname() and basename() may modify the contents
> /.../
> so either accept ugly #ifdefs or give me a hint....
Either find out what the path separator is in configure and test for
that instead of __MINGW32__ (which is out of the question) or pass a
copy to dirname so that modification is not a problem.
Diego
More information about the ffmpeg-devel
mailing list