[FFmpeg-devel] [PATCH] File concat protocol
Michael Niedermayer
michaelni
Tue Jun 19 02:54:14 CEST 2007
Hi
On Mon, Jun 18, 2007 at 03:55:23PM -0000, Wolfram Gloger wrote:
> Hi,
>
> Here is a patch originally by Steve Lhomme from last year which I have
> used successfully for a while and kept forgetting to submit.
>
> I believe I've adressed all of the comments that were made at the time
> (':' as file name sparator, support for arbitrary seeking). I left
> the Windows-specific 'stat' handling as it was but cannot judge whether
> it is necessary (from my POV it could just as well be omitted).
[...]
> diff -Naur trunk/libavformat/file.c ffmpeg-wg/libavformat/file.c
> --- trunk/libavformat/file.c 2007-02-17 12:24:51.000000000 +0100
> +++ ffmpeg-wg/libavformat/file.c 2007-05-02 13:14:02.000000000 +0200
> @@ -22,7 +22,11 @@
this should be in a seperate file not in file.c
also it should not be specific to the file protocol but rather work
with all, its kinda silly if we next add a httpconcat then a filehttpconcat
...
[...]
> +/* multiple file protocol */
> +
> +struct fileconcat_info {
no doxygen comment
[...]
> + strstart(filename, "cat:", &filename);
> +
> + if (flags & URL_RDWR) {
> + access = O_CREAT | O_TRUNC | O_RDWR;
> + } else if (flags & URL_WRONLY) {
> + access = O_CREAT | O_TRUNC | O_WRONLY;
> + } else {
> + access = O_RDONLY;
> + }
> +#if defined(__MINGW32__) || defined(CONFIG_OS2) || defined(__CYGWIN__)
> + access |= O_BINARY;
> +#endif
this is duplicated relative to existing code from file.c
[...]
> +#if defined(CONFIG_WIN32) && !defined(__CYGWIN__)
> + _fstat64(fd, &fstats);
> +#else
> + fstat(fd, &fstats);
> +#endif
i think such ifdef hell should not be accepted in new patches
configure or some other appropriate thing should check availability of
_fstat64/stat and provide a working stat() or set HAVE__STAT64 or whatever
...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070619/e77f5789/attachment.pgp>
More information about the ffmpeg-devel
mailing list