diff options
-rw-r--r-- | libmpcodecs/ae_lavc.c | 3 | ||||
-rw-r--r-- | libmpdemux/demux_lavf.c | 1 | ||||
-rw-r--r-- | libmpdemux/muxer_lavf.c | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/libmpcodecs/ae_lavc.c b/libmpcodecs/ae_lavc.c index ff0172b662..3677aa108b 100644 --- a/libmpcodecs/ae_lavc.c +++ b/libmpcodecs/ae_lavc.c @@ -30,6 +30,7 @@ extern int avcodec_inited; static int compressed_frame_size = 0; #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO) extern unsigned int codec_get_wav_tag(int id); +extern const int mp_wav_tags[]; #endif static int bind_lavc(audio_encoder_t *encoder, muxer_stream_t *mux_a) @@ -173,6 +174,8 @@ int mpae_init_lavc(audio_encoder_t *encoder) { #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO) lavc_param_atag = codec_get_wav_tag(lavc_acodec->id); + if(!lavc_param_atag) + lavc_param_atag = codec_get_tag(mp_wav_tags, lavc_acodec->id); #else lavc_param_atag = lavc_find_atag(lavc_param_acodec); #endif diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 5472505adf..f3a0d2dc26 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -87,6 +87,7 @@ const CodecTag mp_wav_tags[] = { { CODEC_ID_WAVPACK, MKTAG('W', 'V', 'P', 'K')}, { CODEC_ID_WESTWOOD_SND1, MKTAG('S', 'N', 'D', '1')}, { CODEC_ID_XAN_DPCM, MKTAG('A', 'x', 'a', 'n')}, + { CODEC_ID_AMR_NB, MKTAG('n', 'b', 0, 0)}, { 0, 0 }, }; diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c index 17cc80d00a..948b41b754 100644 --- a/libmpdemux/muxer_lavf.c +++ b/libmpdemux/muxer_lavf.c @@ -26,6 +26,7 @@ extern unsigned int codec_get_wav_tag(int id); extern enum CodecID codec_get_bmp_id(unsigned int tag); extern enum CodecID codec_get_wav_id(unsigned int tag); +extern const int mp_wav_tags[]; extern char *info_name; extern char *info_artist; @@ -209,6 +210,8 @@ static void fix_parameters(muxer_stream_t *stream) if(stream->type == MUXER_TYPE_AUDIO) { ctx->codec_id = codec_get_wav_id(stream->wf->wFormatTag); + if(!ctx->codec_id) + ctx->codec_id = codec_get_id(mp_wav_tags, stream->wf->wFormatTag); #if 0 //breaks aac in mov at least ctx->codec_tag = codec_get_wav_tag(ctx->codec_id); #endif |