comparison libmpdemux/muxer_lavf.c @ 17482:e6dc1aeaf8a5

fix aac in mov/mp4
author michael
date Wed, 25 Jan 2006 15:49:31 +0000
parents 3993a5fad89a
children 43ac198cb5cf
comparison
equal deleted inserted replaced
17481:99c0caec4677 17482:e6dc1aeaf8a5
188 ctx->rc_max_rate= stream->max_rate; 188 ctx->rc_max_rate= stream->max_rate;
189 189
190 if(stream->type == MUXER_TYPE_AUDIO) 190 if(stream->type == MUXER_TYPE_AUDIO)
191 { 191 {
192 ctx->codec_id = codec_get_wav_id(stream->wf->wFormatTag); 192 ctx->codec_id = codec_get_wav_id(stream->wf->wFormatTag);
193 #if 0 //breaks aac in mov at least
193 ctx->codec_tag = codec_get_wav_tag(ctx->codec_id); 194 ctx->codec_tag = codec_get_wav_tag(ctx->codec_id);
195 #endif
194 mp_msg(MSGT_MUXER, MSGL_INFO, "AUDIO CODEC ID: %x, TAG: %x\n", ctx->codec_id, (uint32_t) ctx->codec_tag); 196 mp_msg(MSGT_MUXER, MSGL_INFO, "AUDIO CODEC ID: %x, TAG: %x\n", ctx->codec_id, (uint32_t) ctx->codec_tag);
195 ctx->sample_rate = stream->wf->nSamplesPerSec; 197 ctx->sample_rate = stream->wf->nSamplesPerSec;
196 // mp_msg(MSGT_MUXER, MSGL_INFO, "stream->h.dwSampleSize: %d\n", stream->h.dwSampleSize); 198 // mp_msg(MSGT_MUXER, MSGL_INFO, "stream->h.dwSampleSize: %d\n", stream->h.dwSampleSize);
197 ctx->channels = stream->wf->nChannels; 199 ctx->channels = stream->wf->nChannels;
198 if(stream->h.dwRate && (stream->h.dwScale * (int64_t)ctx->sample_rate) % stream->h.dwRate == 0) 200 if(stream->h.dwRate && (stream->h.dwScale * (int64_t)ctx->sample_rate) % stream->h.dwRate == 0)
215 } 217 }
216 } 218 }
217 else if(stream->type == MUXER_TYPE_VIDEO) 219 else if(stream->type == MUXER_TYPE_VIDEO)
218 { 220 {
219 ctx->codec_id = codec_get_bmp_id(stream->bih->biCompression); 221 ctx->codec_id = codec_get_bmp_id(stream->bih->biCompression);
220 #if 0 //breaks mov/mp4 222 if(ctx->codec_id <= 0)
221 ctx->codec_tag= stream->bih->biCompression; 223 ctx->codec_tag= stream->bih->biCompression;
222 #endif
223 mp_msg(MSGT_MUXER, MSGL_INFO, "VIDEO CODEC ID: %d\n", ctx->codec_id); 224 mp_msg(MSGT_MUXER, MSGL_INFO, "VIDEO CODEC ID: %d\n", ctx->codec_id);
224 ctx->width = stream->bih->biWidth; 225 ctx->width = stream->bih->biWidth;
225 ctx->height = stream->bih->biHeight; 226 ctx->height = stream->bih->biHeight;
226 ctx->bit_rate = 800000; 227 ctx->bit_rate = 800000;
227 #if (LIBAVFORMAT_BUILD >= 4624) 228 #if (LIBAVFORMAT_BUILD >= 4624)