mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
ffmpeg: check samplerate from decoder.
Fixes FPE Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a22e64fd02
commit
1664edb998
4
ffmpeg.c
4
ffmpeg.c
@ -2007,6 +2007,10 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
if (avctx->sample_rate <= 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Sample rate %d invalid\n", avctx->sample_rate);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (!*got_output) {
|
||||
/* no audio frame */
|
||||
|
Loading…
Reference in New Issue
Block a user