Commit d180fce6 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavf/cafenc: Only allow mono and stereo for Opus.

Found-by: James Almer
parent a6cfc287
......@@ -123,6 +123,11 @@ static int caf_write_header(AVFormatContext *s)
return AVERROR_PATCHWELCOME;
}
if (par->codec_id == AV_CODEC_ID_OPUS && par->channels > 2) {
av_log(s, AV_LOG_ERROR, "Only mono and stereo are supported for Opus\n");
return AVERROR_INVALIDDATA;
}
if (!codec_tag) {
av_log(s, AV_LOG_ERROR, "unsupported codec\n");
return AVERROR_INVALIDDATA;
......
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