diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-23 10:59:03 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-23 10:59:03 +0100 |
commit | 1664edb99859d0a9dfb8dc046f6ed922db301f78 (patch) | |
tree | 0ce6cf7a56cf8de5904f72f8019e81ffbb704bed /ffmpeg.c | |
parent | a22e64fd02133867406604cb6589bb31696f08bc (diff) | |
download | ffmpeg-1664edb99859d0a9dfb8dc046f6ed922db301f78.tar.gz |
ffmpeg: check samplerate from decoder.
Fixes FPE
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 */ |