*/
#include "avformat.h"
+#include "internal.h"
#include "avio_internal.h"
#include "pcm.h"
#include "riff.h"
}
/* au input */
-static int au_read_header(AVFormatContext *s,
- AVFormatParameters *ap)
+static int au_read_header(AVFormatContext *s)
{
int size;
unsigned int tag;
return AVERROR_INVALIDDATA;
}
+ if (channels == 0 || channels > 64) {
+ av_log(s, AV_LOG_ERROR, "Invalid number of channels %d\n", channels);
+ return AVERROR_INVALIDDATA;
+ }
+
if (size >= 24) {
/* skip unused data */
avio_skip(pb, size - 24);
st->codec->codec_id = codec;
st->codec->channels = channels;
st->codec->sample_rate = rate;
- av_set_pts_info(st, 64, 1, rate);
+ avpriv_set_pts_info(st, 64, 1, rate);
return 0;
}
.read_probe = au_probe,
.read_header = au_read_header,
.read_packet = au_read_packet,
- .read_seek = pcm_read_seek,
- .codec_tag= (const AVCodecTag* const []){codec_au_tags, 0},
+ .read_seek = ff_pcm_read_seek,
+ .codec_tag = (const AVCodecTag* const []){ codec_au_tags, 0 },
};
#endif
.write_header = au_write_header,
.write_packet = au_write_packet,
.write_trailer = au_write_trailer,
- .codec_tag= (const AVCodecTag* const []){codec_au_tags, 0},
+ .codec_tag = (const AVCodecTag* const []){ codec_au_tags, 0 },
};
#endif //CONFIG_AU_MUXER