[Ffmpeg-devel] A little patch to libavformat/raw.c
Diego Biurrun
diego
Fri Jun 16 00:05:35 CEST 2006
On Thu, Jun 15, 2006 at 04:40:34PM +0200, Michael Niedermayer wrote:
>
> On Thu, Jun 15, 2006 at 04:48:28PM +0400, Alexey Rudnev wrote:
> >
> > >> while compiling ffmpeg with neither CONFIG_MUXERS nor CONFIG_DEMUXERS,
> > >> found that it fails to compile on a libavformat/raw.c. Here is a
> > >> little patch to it that probably correctly solves the problem.
> >
> > > Patches must be in unified diff format (diff -u or svn diff).
> >
> > sorry for inconvenience
>
> this can be done with less code duplication ...
.. as attached ..
I'll commit tomorrow unless somebody sends me Cola first.
Diego
-------------- next part --------------
Index: libavformat/raw.c
===================================================================
--- libavformat/raw.c (revision 5480)
+++ libavformat/raw.c (working copy)
@@ -678,16 +678,7 @@
.value = codec,\
};
-#if !defined(CONFIG_MUXERS) && defined(CONFIG_DEMUXERS)
-
-#define PCMDEF(name, long_name, ext, codec) \
- PCMINPUTDEF(name, long_name, ext, codec)
-
-#else
-
-#define PCMDEF(name, long_name, ext, codec) \
- PCMINPUTDEF(name, long_name, ext, codec)\
-\
+#define PCMOUTPUTDEF(name, long_name, ext, codec) \
AVOutputFormat pcm_ ## name ## _oformat = {\
#name,\
long_name,\
@@ -700,8 +691,22 @@
raw_write_packet,\
raw_write_trailer,\
};
-#endif //CONFIG_MUXERS
+
+#if !defined(CONFIG_MUXERS) && defined(CONFIG_DEMUXERS)
+#define PCMDEF(name, long_name, ext, codec) \
+ PCMINPUTDEF(name, long_name, ext, codec)
+#elif defined(CONFIG_MUXERS) && !defined(CONFIG_DEMUXERS)
+#define PCMDEF(name, long_name, ext, codec) \
+ PCMOUTPUTDEF(name, long_name, ext, codec)
+#elif defined(CONFIG_MUXERS) && defined(CONFIG_DEMUXERS)
+#define PCMDEF(name, long_name, ext, codec) \
+ PCMINPUTDEF(name, long_name, ext, codec)\
+ PCMOUTPUTDEF(name, long_name, ext, codec)
+#else
+#define PCMDEF(name, long_name, ext, codec)
+#endif
+
#ifdef WORDS_BIGENDIAN
#define BE_DEF(s) s
#define LE_DEF(s) NULL
More information about the ffmpeg-devel
mailing list