Commit 1664edb9 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: check samplerate from decoder.

Fixes FPE

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a22e64fd
...@@ -2007,6 +2007,10 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) ...@@ -2007,6 +2007,10 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
if (ret < 0) { if (ret < 0) {
return ret; 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) { if (!*got_output) {
/* no audio frame */ /* no audio frame */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment