aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2009-09-22 12:39:19 +0000
committerDiego Biurrun <diego@biurrun.de>2009-09-22 12:39:19 +0000
commitde653ba3bb3235bc3385c6cee6249446e56781e5 (patch)
tree9e07dcd7ab84e8220b0366dc35157df431e49ff9 /libavformat
parenta3d7c19728e1ccf68a2fcc5167767abda558331d (diff)
downloadffmpeg-de653ba3bb3235bc3385c6cee6249446e56781e5.tar.gz
Place MP3 demuxer code under appropriate #ifdefs.
Fixes compilation with --disable-optimizations --disable-demuxers. Originally committed as revision 19964 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mp3.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/libavformat/mp3.c b/libavformat/mp3.c
index b8b83b4b25..ab57227c71 100644
--- a/libavformat/mp3.c
+++ b/libavformat/mp3.c
@@ -21,12 +21,15 @@
#include <strings.h>
#include "libavutil/avstring.h"
-#include "libavcodec/mpegaudio.h"
-#include "libavcodec/mpegaudiodecheader.h"
#include "avformat.h"
#include "id3v2.h"
#include "id3v1.h"
+#if CONFIG_MP3_DEMUXER
+
+#include "libavcodec/mpegaudio.h"
+#include "libavcodec/mpegaudiodecheader.h"
+
/* mp3 read */
static int mp3_read_probe(AVProbeData *p)
@@ -169,6 +172,18 @@ static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt)
return ret;
}
+AVInputFormat mp3_demuxer = {
+ "mp3",
+ NULL_IF_CONFIG_SMALL("MPEG audio layer 2/3"),
+ 0,
+ mp3_read_probe,
+ mp3_read_header,
+ mp3_read_packet,
+ .flags= AVFMT_GENERIC_INDEX,
+ .extensions = "mp2,mp3,m2a", /* XXX: use probe */
+};
+#endif
+
#if CONFIG_MP2_MUXER || CONFIG_MP3_MUXER
static int id3v1_set_string(AVFormatContext *s, const char *key,
uint8_t *buf, int buf_size)
@@ -300,18 +315,6 @@ static int mp3_write_trailer(struct AVFormatContext *s)
}
#endif /* CONFIG_MP2_MUXER || CONFIG_MP3_MUXER */
-#if CONFIG_MP3_DEMUXER
-AVInputFormat mp3_demuxer = {
- "mp3",
- NULL_IF_CONFIG_SMALL("MPEG audio layer 2/3"),
- 0,
- mp3_read_probe,
- mp3_read_header,
- mp3_read_packet,
- .flags= AVFMT_GENERIC_INDEX,
- .extensions = "mp2,mp3,m2a", /* XXX: use probe */
-};
-#endif
#if CONFIG_MP2_MUXER
AVOutputFormat mp2_muxer = {
"mp2",