summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-22 05:00:25 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-26 06:16:52 +0300
commit9ce0838ffd01371bd5b62fae38f94ce23d5339bb (patch)
tree4d787831ce5678ffa061e7c3a4b198744601b649 /libmpcodecs
parentcd4e8dc1fa2863dcce62a44dd9ea105f9f9288f4 (diff)
downloadmpv-9ce0838ffd01371bd5b62fae38f94ce23d5339bb.tar.bz2
mpv-9ce0838ffd01371bd5b62fae38f94ce23d5339bb.tar.xz
Use own mp_*_taglists code instead of libavformat internals
Use the version of code under ffmpeg_files/ instead of relying on libavformat source files to be available.
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ae_lavc.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/libmpcodecs/ae_lavc.c b/libmpcodecs/ae_lavc.c
index 139d26636f..205893189b 100644
--- a/libmpcodecs/ae_lavc.c
+++ b/libmpcodecs/ae_lavc.c
@@ -26,10 +26,7 @@ extern int lavc_param_atag;
extern int lavc_param_audio_global_header;
extern int avcodec_initialized;
static int compressed_frame_size = 0;
-#ifdef CONFIG_LIBAVFORMAT
-#include "libavformat/avformat.h"
-extern const struct AVCodecTag *mp_wav_taglists[];
-#endif
+#include "libmpdemux/mp_taglists.h"
static int bind_lavc(audio_encoder_t *encoder, muxer_stream_t *mux_a)
{
@@ -133,32 +130,6 @@ static int get_frame_size(audio_encoder_t *encoder)
return sz;
}
-#ifndef CONFIG_LIBAVFORMAT
-static uint32_t lavc_find_atag(char *codec)
-{
- if(codec == NULL)
- return 0;
-
- if(! strcasecmp(codec, "mp2"))
- return 0x50;
-
- if(! strcasecmp(codec, "mp3"))
- return 0x55;
-
- if(! strcasecmp(codec, "ac3"))
- return 0x2000;
-
- if(! strcasecmp(codec, "adpcm_ima_wav"))
- return 0x11;
-
- if(! strncasecmp(codec, "bonk", 4))
- return 0x2048;
-
- return 0;
-}
-#endif
-
-
int mpae_init_lavc(audio_encoder_t *encoder)
{
encoder->params.samples_per_frame = encoder->params.sample_rate;
@@ -184,11 +155,7 @@ int mpae_init_lavc(audio_encoder_t *encoder)
}
if(lavc_param_atag == 0)
{
-#ifdef CONFIG_LIBAVFORMAT
- lavc_param_atag = av_codec_get_tag(mp_wav_taglists, lavc_acodec->id);
-#else
- lavc_param_atag = lavc_find_atag(lavc_param_acodec);
-#endif
+ lavc_param_atag = mp_av_codec_get_tag(mp_wav_taglists, lavc_acodec->id);
if(!lavc_param_atag)
{
mp_msg(MSGT_MENCODER, MSGL_FATAL, "Couldn't find wav tag for specified codec, exit\n");