tests: WMA demuxing/decoding

This commit is contained in:
Alexander Kojevnikov 2013-03-29 09:16:42 -07:00
parent ae8cd33b8e
commit efef66c892
4 changed files with 7 additions and 1 deletions

View File

@ -137,7 +137,9 @@ std::unique_ptr<AudioFile> Audio::open(const std::string& file_name)
bits_per_sample = codec_context->bits_per_coded_sample;
}
if (codec_context->codec_id == AV_CODEC_ID_AAC ||
codec_context->codec_id == AV_CODEC_ID_MUSEPACK8) {
codec_context->codec_id == AV_CODEC_ID_MUSEPACK8 ||
codec_context->codec_id == AV_CODEC_ID_WMAV1 ||
codec_context->codec_id == AV_CODEC_ID_WMAV2) {
// These decoders set both bps and bitrate.
bits_per_sample = 0;
}

Binary file not shown.

Binary file not shown.

View File

@ -115,6 +115,10 @@ void test_audio()
{AudioError::OK, "ATSC A/52", 192000, 44100, 0, 2, AC3_T, 9 * 1024}},
{"2ch-44100Hz-std.mpc",
{AudioError::OK, "Musepack", 0, 44100, 0, 2, 0.0, 11 * 1024 + 256}},
{"2ch-44100Hz-v1.wma",
{AudioError::OK, "Windows Media Audio 1", 128000, 44100, 0, 2, 0.138, 12 * 1024}},
{"2ch-44100Hz-v2.wma",
{AudioError::OK, "Windows Media Audio 2", 128000, 44100, 0, 2, 0.138, 12 * 1024}},
};
Audio audio;