au: use ff_raw_write_packet()
authorJustin Ruggles <justin.ruggles@gmail.com>
Fri, 4 Jan 2013 19:52:57 +0000 (19:52 +0000)
committerPaul B Mahol <onemda@gmail.com>
Fri, 4 Jan 2013 19:52:57 +0000 (19:52 +0000)
libavformat/Makefile
libavformat/au.c

index 2266dee..a857178 100644 (file)
@@ -75,7 +75,7 @@ OBJS-$(CONFIG_ASS_MUXER)                 += assenc.o
 OBJS-$(CONFIG_AST_DEMUXER)               += ast.o astdec.o
 OBJS-$(CONFIG_AST_MUXER)                 += ast.o astenc.o
 OBJS-$(CONFIG_AU_DEMUXER)                += au.o pcm.o
-OBJS-$(CONFIG_AU_MUXER)                  += au.o
+OBJS-$(CONFIG_AU_MUXER)                  += au.o rawenc.o
 OBJS-$(CONFIG_AVI_DEMUXER)               += avidec.o
 OBJS-$(CONFIG_AVI_MUXER)                 += avienc.o
 OBJS-$(CONFIG_AVISYNTH)                  += avisynth.o
index 4cf8966..2e54a18 100644 (file)
@@ -135,6 +135,8 @@ AVInputFormat ff_au_demuxer = {
 
 #if CONFIG_AU_MUXER
 
+#include "rawenc.h"
+
 /* AUDIO_FILE header */
 static int put_au_header(AVIOContext *pb, AVCodecContext *enc)
 {
@@ -164,13 +166,6 @@ static int au_write_header(AVFormatContext *s)
     return 0;
 }
 
-static int au_write_packet(AVFormatContext *s, AVPacket *pkt)
-{
-    AVIOContext *pb = s->pb;
-    avio_write(pb, pkt->data, pkt->size);
-    return 0;
-}
-
 static int au_write_trailer(AVFormatContext *s)
 {
     AVIOContext *pb = s->pb;
@@ -196,7 +191,7 @@ AVOutputFormat ff_au_muxer = {
     .audio_codec       = AV_CODEC_ID_PCM_S16BE,
     .video_codec       = AV_CODEC_ID_NONE,
     .write_header      = au_write_header,
-    .write_packet      = au_write_packet,
+    .write_packet      = ff_raw_write_packet,
     .write_trailer     = au_write_trailer,
     .codec_tag         = (const AVCodecTag* const []){ codec_au_tags, 0 },
 };