You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
brstm: reject negative sample rate
A negative sample rate causes assertion failures in av_rescale_rnd. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
@@ -205,7 +205,7 @@ static int read_header(AVFormatContext *s)
|
|||||||
avio_skip(s->pb, 1); // padding
|
avio_skip(s->pb, 1); // padding
|
||||||
|
|
||||||
st->codec->sample_rate = bfstm ? read32(s) : read16(s);
|
st->codec->sample_rate = bfstm ? read32(s) : read16(s);
|
||||||
if (!st->codec->sample_rate)
|
if (st->codec->sample_rate <= 0)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if (!bfstm)
|
if (!bfstm)
|
||||||
|
Reference in New Issue
Block a user