mirror of https://git.ffmpeg.org/ffmpeg.git
r3d: check that sampling rate is non negative.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
df92ac1852
commit
99b1b2b1c6
|
@ -285,6 +285,10 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
|
|||
dts = avio_rb32(s->pb);
|
||||
|
||||
st->codec->sample_rate = avio_rb32(s->pb);
|
||||
if (st->codec->sample_rate < 0) {
|
||||
av_log(s, AV_LOG_ERROR, "negative sample rate\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
samples = avio_rb32(s->pb);
|
||||
|
||||
|
|
Loading…
Reference in New Issue