[MPlayer-cvslog] r21787 - in trunk: libmpcodecs/ae_lavc.c libmpdemux/demux_lavf.c libmpdemux/muxer_lavf.c

michael subversion at mplayerhq.hu
Fri Dec 29 19:56:28 CET 2006


Author: michael
Date: Fri Dec 29 19:56:28 2006
New Revision: 21787

Modified:
   trunk/libmpcodecs/ae_lavc.c
   trunk/libmpdemux/demux_lavf.c
   trunk/libmpdemux/muxer_lavf.c

Log:
first step toward amr-nb muxing support


Modified: trunk/libmpcodecs/ae_lavc.c
==============================================================================
--- trunk/libmpcodecs/ae_lavc.c	(original)
+++ trunk/libmpcodecs/ae_lavc.c	Fri Dec 29 19:56:28 2006
@@ -30,6 +30,7 @@
 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 @@
 	{
 #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

Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	(original)
+++ trunk/libmpdemux/demux_lavf.c	Fri Dec 29 19:56:28 2006
@@ -87,6 +87,7 @@
     { 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 },
 };
 

Modified: trunk/libmpdemux/muxer_lavf.c
==============================================================================
--- trunk/libmpdemux/muxer_lavf.c	(original)
+++ trunk/libmpdemux/muxer_lavf.c	Fri Dec 29 19:56:28 2006
@@ -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 @@
 	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



More information about the MPlayer-cvslog mailing list