-#ifdef CONFIG_ENCODERS
-/* AUDIO_FILE header */
-static int put_au_header(ByteIOContext *pb, AVCodecContext *enc)
-{
- if(!enc->codec_tag)
- enc->codec_tag = codec_get_tag(codec_au_tags, enc->codec_id);
- if(!enc->codec_tag)
- return -1;
- put_tag(pb, ".snd"); /* magic number */
- put_be32(pb, 24); /* header size */
- put_be32(pb, AU_UNKOWN_SIZE); /* data size */
- put_be32(pb, (uint32_t)enc->codec_tag); /* codec ID */
- put_be32(pb, enc->sample_rate);
- put_be32(pb, (uint32_t)enc->channels);
- return 0;
-}
-
-static int au_write_header(AVFormatContext *s)
-{
- ByteIOContext *pb = &s->pb;
-
- s->priv_data = NULL;
-
- /* format header */
- if (put_au_header(pb, s->streams[0]->codec) < 0) {
- return -1;
- }
-
- put_flush_packet(pb);
-
- return 0;
-}
-
-static int au_write_packet(AVFormatContext *s, AVPacket *pkt)
-{
- ByteIOContext *pb = &s->pb;
- put_buffer(pb, pkt->data, pkt->size);
- return 0;
-}
-
-static int au_write_trailer(AVFormatContext *s)
-{
- ByteIOContext *pb = &s->pb;
- offset_t file_size;
-
- if (!url_is_streamed(&s->pb)) {
-
- /* update file size */
- file_size = url_ftell(pb);
- url_fseek(pb, 8, SEEK_SET);
- put_be32(pb, (uint32_t)(file_size - 24));
- url_fseek(pb, file_size, SEEK_SET);
-
- put_flush_packet(pb);
- }
-
- return 0;
-}
-#endif //CONFIG_ENCODERS