comparison libmpdemux/muxer_lavf.c @ 34155:505b49b171f4

Change codec tag/id conversion to not use ff_codec_bmp_tags/ff_codec_wav_tags. This fixes linking against latest FFmpeg dynamic libs.
author reimar
date Sun, 23 Oct 2011 12:12:43 +0000
parents f27fe61c62f7
children 8f919281f8ca
comparison
equal deleted inserted replaced
34154:a42d4bc441d7 34155:505b49b171f4
188 ctx->rc_buffer_size= stream->vbv_size; 188 ctx->rc_buffer_size= stream->vbv_size;
189 ctx->rc_max_rate= stream->max_rate; 189 ctx->rc_max_rate= stream->max_rate;
190 190
191 if(stream->type == MUXER_TYPE_AUDIO) 191 if(stream->type == MUXER_TYPE_AUDIO)
192 { 192 {
193 ctx->codec_id = av_codec_get_id(mp_wav_taglists, stream->wf->wFormatTag); 193 ctx->codec_id = mp_tag2codec_id(stream->wf->wFormatTag, 1);
194 #if 0 //breaks aac in mov at least 194 #if 0 //breaks aac in mov at least
195 ctx->codec_tag = codec_get_wav_tag(ctx->codec_id); 195 ctx->codec_tag = codec_get_wav_tag(ctx->codec_id);
196 #endif 196 #endif
197 mp_msg(MSGT_MUXER, MSGL_INFO, "AUDIO CODEC ID: %x, TAG: %x\n", ctx->codec_id, (uint32_t) ctx->codec_tag); 197 mp_msg(MSGT_MUXER, MSGL_INFO, "AUDIO CODEC ID: %x, TAG: %x\n", ctx->codec_id, (uint32_t) ctx->codec_tag);
198 ctx->sample_rate = stream->wf->nSamplesPerSec; 198 ctx->sample_rate = stream->wf->nSamplesPerSec;
217 stream->wf->cbSize); 217 stream->wf->cbSize);
218 } 218 }
219 } 219 }
220 else if(stream->type == MUXER_TYPE_VIDEO) 220 else if(stream->type == MUXER_TYPE_VIDEO)
221 { 221 {
222 ctx->codec_id = av_codec_get_id(mp_bmp_taglists, stream->bih->biCompression); 222 ctx->codec_id = mp_tag2codec_id(stream->bih->biCompression, 0);
223 if(ctx->codec_id <= 0 || force_fourcc) 223 if(ctx->codec_id <= 0 || force_fourcc)
224 ctx->codec_tag= stream->bih->biCompression; 224 ctx->codec_tag= stream->bih->biCompression;
225 mp_msg(MSGT_MUXER, MSGL_INFO, "VIDEO CODEC ID: %d\n", ctx->codec_id); 225 mp_msg(MSGT_MUXER, MSGL_INFO, "VIDEO CODEC ID: %d\n", ctx->codec_id);
226 if (stream->imgfmt) 226 if (stream->imgfmt)
227 ctx->pix_fmt = imgfmt2pixfmt(stream->imgfmt); 227 ctx->pix_fmt = imgfmt2pixfmt(stream->imgfmt);