Skip to content

Commit

Permalink
avformat/wsddec: set bit_rate, fixes duration estimation
Browse files Browse the repository at this point in the history
Signed-off-by: Paul B Mahol <onemda@gmail.com>
  • Loading branch information
richardpl committed May 1, 2016
1 parent 423a6a0 commit 25482d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libavformat/wsddec.c
Expand Up @@ -128,6 +128,7 @@ static int wsd_read_header(AVFormatContext *s)
st->codecpar->sample_rate = avio_rb32(pb) / 8;
avio_skip(pb, 4);
st->codecpar->channels = avio_r8(pb) & 0xF;
st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate * 8LL;
if (!st->codecpar->channels)
return AVERROR_INVALIDDATA;

Expand Down

0 comments on commit 25482d5

Please sign in to comment.