[Ffmpeg-devel] amr.c misses ifdef for CONFIG_MUXERS

Gianluigi Tiesi mplayer
Sun Jan 22 07:35:47 CET 2006


I've noticed that libavcodec/format compiles now without a patch,
when disabling MUXERS/ENCODERS, the only file that doesn't follows this
is amr.c, here a patch to fix this, but you can patch it differently,
since my patch removes all the muxer code, I've seen other files
are only disabling the code and ifdef'ing the strictly needed.

Bye

-- 
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
-------------- next part --------------
diff -NubBr -xCVS -xhelp_mp.h -x'*.a' -x'*.exe' -x'*.o' -xconfigure.log -xconfig.mak -x.cvsignore -xconfig.h -xcodecs.conf.h -xversion.h -x.depend main/libavformat/amr.c sherpya/libavformat/amr.c
--- main/libavformat/amr.c	2006-01-14 10:06:16.046955200 +0100
+++ sherpya/libavformat/amr.c	2006-01-22 07:27:33.283024000 +0100
@@ -27,7 +27,7 @@
 
 static const unsigned char AMR_header [] = "#!AMR\n";
 static const unsigned char AMRWB_header [] = "#!AMR-WB\n";
-
+#ifdef CONFIG_MUXERS
 static int amr_write_header(AVFormatContext *s)
 {
     ByteIOContext *pb = &s->pb;
@@ -62,7 +62,7 @@
 {
     return 0;
 }
-
+#endif // CONFIG_MUXERS
 static int amr_probe(AVProbeData *p)
 {
     //Only check for "#!AMR" which could be amr-wb, amr-nb.
@@ -222,7 +222,7 @@
     amr_read_packet,
     amr_read_close,
 };
-
+#ifdef CONFIG_MUXERS
 static AVOutputFormat amr_oformat = {
     "amr",
     "3gpp amr file format",
@@ -235,10 +235,12 @@
     amr_write_packet,
     amr_write_trailer,
 };
-
+#endif
 int amr_init(void)
 {
     av_register_input_format(&amr_iformat);
+#ifdef CONFIG_MUXERS
     av_register_output_format(&amr_oformat);
+#endif
     return 0;
 }



More information about the ffmpeg-devel mailing list