Commit d0a503c9 authored by Paul B Mahol's avatar Paul B Mahol

ast: check bit depth too

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent f5f29910
...@@ -33,7 +33,7 @@ static int ast_probe(AVProbeData *p) ...@@ -33,7 +33,7 @@ static int ast_probe(AVProbeData *p)
static int ast_read_header(AVFormatContext *s) static int ast_read_header(AVFormatContext *s)
{ {
int codec; int codec, depth;
AVStream *st; AVStream *st;
st = avformat_new_stream(s, NULL); st = avformat_new_stream(s, NULL);
...@@ -50,7 +50,11 @@ static int ast_read_header(AVFormatContext *s) ...@@ -50,7 +50,11 @@ static int ast_read_header(AVFormatContext *s)
av_log(s, AV_LOG_ERROR, "unsupported codec %d\n", codec); av_log(s, AV_LOG_ERROR, "unsupported codec %d\n", codec);
} }
avio_skip(s->pb, 2); depth = avio_rb16(s->pb);
if (depth != 16) {
av_log_ask_for_sample(s, "unsupported depth %d\n", depth);
return AVERROR_INVALIDDATA;
}
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->channels = avio_rb16(s->pb); st->codec->channels = avio_rb16(s->pb);
......
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