Commit 7b67fe20 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun

brstm: reject negative sample rate

A negative sample rate causes assertion failures in av_rescale_rnd.
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent 9c664280
......@@ -205,7 +205,7 @@ static int read_header(AVFormatContext *s)
avio_skip(s->pb, 1); // padding
st->codec->sample_rate = bfstm ? read32(s) : read16(s);
if (!st->codec->sample_rate)
if (st->codec->sample_rate <= 0)
return AVERROR_INVALIDDATA;
if (!bfstm)
......
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