mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
avformat/wsddec: set bit_rate, fixes duration estimation
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
423a6a0993
commit
25482d5c42
@ -128,6 +128,7 @@ static int wsd_read_header(AVFormatContext *s)
|
|||||||
st->codecpar->sample_rate = avio_rb32(pb) / 8;
|
st->codecpar->sample_rate = avio_rb32(pb) / 8;
|
||||||
avio_skip(pb, 4);
|
avio_skip(pb, 4);
|
||||||
st->codecpar->channels = avio_r8(pb) & 0xF;
|
st->codecpar->channels = avio_r8(pb) & 0xF;
|
||||||
|
st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate * 8LL;
|
||||||
if (!st->codecpar->channels)
|
if (!st->codecpar->channels)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user