|
@@ -56,6 +56,12 @@ 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",
|
|
|
+ st->codec->sample_rate);
|
|
|
+ return AVERROR(EINVAL);
|
|
|
+ }
|
|
|
+
|
|
|
if (s1 && s1->channels)
|
|
|
st->codec->channels = s1->channels;
|
|
|
|