Mercurial > libavformat.hg
comparison matroskaenc.c @ 2493:61bc7a789851 libavformat
Use sample format for bit depth if av_get_bits_per_sample() doesn't give one
author | conrad |
---|---|
date | Wed, 05 Sep 2007 00:25:14 +0000 |
parents | cdd7d0f4d93c |
children | 7dfbd8e0502f |
comparison
equal
deleted
inserted
replaced
2492:cdd7d0f4d93c | 2493:61bc7a789851 |
---|---|
496 int native_id = 0; | 496 int native_id = 0; |
497 int bit_depth = av_get_bits_per_sample(codec->codec_id); | 497 int bit_depth = av_get_bits_per_sample(codec->codec_id); |
498 int sample_rate = codec->sample_rate; | 498 int sample_rate = codec->sample_rate; |
499 int output_sample_rate = 0; | 499 int output_sample_rate = 0; |
500 | 500 |
501 if (!bit_depth) | |
502 bit_depth = av_get_bits_per_sample_format(codec->sample_fmt); | |
503 | |
501 if (codec->codec_id == CODEC_ID_AAC) | 504 if (codec->codec_id == CODEC_ID_AAC) |
502 get_aac_sample_rates(codec, &sample_rate, &output_sample_rate); | 505 get_aac_sample_rates(codec, &sample_rate, &output_sample_rate); |
503 | 506 |
504 track = start_ebml_master(pb, MATROSKA_ID_TRACKENTRY, 0); | 507 track = start_ebml_master(pb, MATROSKA_ID_TRACKENTRY, 0); |
505 put_ebml_uint (pb, MATROSKA_ID_TRACKNUMBER , i + 1); | 508 put_ebml_uint (pb, MATROSKA_ID_TRACKNUMBER , i + 1); |