Browse Source

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>
tags/n0.9
Michael Niedermayer 13 years ago
parent
commit
fca85ce5ec
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/rawdec.c

+ 2
- 2
libavformat/rawdec.c View File

@@ -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)


Loading…
Cancel
Save