mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
au: validate bits-per-sample separately from codec tag
This commit is contained in:
parent
71194ef6a8
commit
3f98848d6e
1 changed files with 8 additions and 1 deletions
|
|
@ -64,6 +64,7 @@ static int au_read_header(AVFormatContext *s)
|
|||
unsigned int tag;
|
||||
AVIOContext *pb = s->pb;
|
||||
unsigned int id, channels, rate;
|
||||
int bps;
|
||||
enum AVCodecID codec;
|
||||
AVStream *st;
|
||||
|
||||
|
|
@ -80,7 +81,13 @@ static int au_read_header(AVFormatContext *s)
|
|||
|
||||
codec = ff_codec_get_id(codec_au_tags, id);
|
||||
|
||||
if (!av_get_bits_per_sample(codec)) {
|
||||
if (codec == AV_CODEC_ID_NONE) {
|
||||
av_log_ask_for_sample(s, "unknown or unsupported codec tag: %d\n", id);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
bps = av_get_bits_per_sample(codec);
|
||||
if (!bps) {
|
||||
av_log_ask_for_sample(s, "could not determine bits per sample\n");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue