diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-18 22:34:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-18 22:34:41 +0100 |
commit | fca85ce5ecc8acba6a5cf10c5f99e932b26c6367 (patch) | |
tree | b9fd5e34ba8d8e4a49d9594b3b9c38606d9343bf | |
parent | 6f326b5054122d6e741fa24982a9796c4db7a48f (diff) | |
download | ffmpeg-fca85ce5ecc8acba6a5cf10c5f99e932b26c6367.tar.gz |
rawdec: use a default sample rate if none is specified.
Fixes "ffmpeg -f s16le -i /dev/zero"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/rawdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c index e48b4f24a3..2b76985338 100644 --- a/libavformat/rawdec.c +++ b/libavformat/rawdec.c @@ -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) |