Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-19 01:34:41 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-11-19 02:09:56 +0400
commit64a854d06bb36bd417bdd1ea16567732dc890ad3 (patch)
tree4b307ad3f18c5838216ca290312f90361e5ceea5
parent91805f06a39ca82e1463ebce578452d0e2f22bf6 (diff)
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> (cherry picked from commit fca85ce5ecc8acba6a5cf10c5f99e932b26c6367) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/rawdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index 02e335ad1b..d4383d5b49 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -60,9 +60,9 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (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->channels)