diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-11-10 20:10:23 +0100 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-11-26 01:35:45 +0100 |
commit | d09fd0736a43b7a7df0873ca0ed99fbce9dc97ff (patch) | |
tree | 79e69b37f8bd9f243eeb294bdc1bacea50f5cdf9 /libavformat/brstm.c | |
parent | c3f276b60830750a31e73c54edc2dd33e1f172bf (diff) | |
download | ffmpeg-d09fd0736a43b7a7df0873ca0ed99fbce9dc97ff.tar.gz |
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>
(cherry picked from commit 7b67fe20f6c5ce21ed1cac01fdb1906e515bc87e)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'libavformat/brstm.c')
-rw-r--r-- | libavformat/brstm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/brstm.c b/libavformat/brstm.c index f2bc038840..7ad40b0b19 100644 --- a/libavformat/brstm.c +++ b/libavformat/brstm.c @@ -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) |