Commit 7f549b83 authored by Hendrik Leppkes's avatar Hendrik Leppkes Committed by Anton Khirnov

riff: don't overwrite bps from WAVEFORMATEX if EXTENSIBLE doesn't contain that data.

According to the specification on the MSDN [1], 0 is valid for that
particular field, and it should be ignored in that case.

[1]: http://msdn.microsoft.com/en-us/library/windows/desktop/dd757714(v=vs.85).aspx

Bug-Id: 950
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 6135c3b6
......@@ -57,7 +57,11 @@ enum AVCodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid)
static void parse_waveformatex(AVIOContext *pb, AVCodecParameters *par)
{
ff_asf_guid subformat;
par->bits_per_coded_sample = avio_rl16(pb);
int bps;
bps = avio_rl16(pb);
if (bps)
par->bits_per_coded_sample = bps;
par->channel_layout = avio_rl32(pb); /* dwChannelMask */
ff_get_guid(pb, &subformat);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment