Commit fca85ce5 authored by Michael Niedermayer's avatar Michael Niedermayer

rawdec: use a default sample rate if none is specified.

Fixes "ffmpeg -f s16le -i /dev/zero"
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6f326b50
......@@ -57,9 +57,9 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (s1 && s1->sample_rate)
st->codec->sample_rate = s1->sample_rate;
if (st->codec->sample_rate <= 0) {
av_log(s, AV_LOG_ERROR, "Invalid sample rate %d specified\n",
av_log(s, AV_LOG_WARNING, "Invalid sample rate %d specified using default of 44100\n",
st->codec->sample_rate);
return AVERROR(EINVAL);
st->codec->sample_rate= 44100;
}
if (s1 && s1->channels)
......
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