changeset 17482:e6dc1aeaf8a5

fix aac in mov/mp4
author michael
date Wed, 25 Jan 2006 15:49:31 +0000
parents 99c0caec4677
children eab33e0f6b77
files libmpdemux/muxer_lavf.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_lavf.c	Wed Jan 25 11:28:19 2006 +0000
+++ b/libmpdemux/muxer_lavf.c	Wed Jan 25 15:49:31 2006 +0000
@@ -190,7 +190,9 @@
 	if(stream->type == MUXER_TYPE_AUDIO)
 	{
 		ctx->codec_id = codec_get_wav_id(stream->wf->wFormatTag); 
+#if 0 //breaks aac in mov at least
 		ctx->codec_tag = codec_get_wav_tag(ctx->codec_id);
+#endif
 		mp_msg(MSGT_MUXER, MSGL_INFO, "AUDIO CODEC ID: %x, TAG: %x\n", ctx->codec_id, (uint32_t) ctx->codec_tag);
 		ctx->sample_rate = stream->wf->nSamplesPerSec;
 //                mp_msg(MSGT_MUXER, MSGL_INFO, "stream->h.dwSampleSize: %d\n", stream->h.dwSampleSize);
@@ -217,9 +219,8 @@
 	else if(stream->type == MUXER_TYPE_VIDEO)
 	{
 		ctx->codec_id = codec_get_bmp_id(stream->bih->biCompression);
-#if 0 //breaks mov/mp4
-                ctx->codec_tag= stream->bih->biCompression;
-#endif
+                if(ctx->codec_id <= 0)
+                    ctx->codec_tag= stream->bih->biCompression;
 		mp_msg(MSGT_MUXER, MSGL_INFO, "VIDEO CODEC ID: %d\n", ctx->codec_id);
 		ctx->width = stream->bih->biWidth;
 		ctx->height = stream->bih->biHeight;