[FFmpeg-cvslog] aiffenc: use ff_raw_write_packet()
Paul B Mahol
git at videolan.org
Fri Dec 28 23:21:50 CET 2012
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Dec 28 22:06:39 2012 +0000| [f18d2137d6e72fa2b65e5c4d4c3544f54498ef9a] | committer: Paul B Mahol
aiffenc: use ff_raw_write_packet()
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f18d2137d6e72fa2b65e5c4d4c3544f54498ef9a
---
libavformat/Makefile | 2 +-
libavformat/aiffenc.c | 10 ++--------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 5c22c80..0115334 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -59,7 +59,7 @@ OBJS-$(CONFIG_AEA_DEMUXER) += aea.o pcm.o
OBJS-$(CONFIG_AFC_DEMUXER) += afc.o
OBJS-$(CONFIG_AIFF_DEMUXER) += aiffdec.o pcm.o isom.o \
mov_chan.o
-OBJS-$(CONFIG_AIFF_MUXER) += aiffenc.o isom.o
+OBJS-$(CONFIG_AIFF_MUXER) += aiffenc.o isom.o rawenc.o
OBJS-$(CONFIG_AMR_DEMUXER) += amr.o
OBJS-$(CONFIG_AMR_MUXER) += amr.o
OBJS-$(CONFIG_ANM_DEMUXER) += anm.o
diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c
index ba5f607..df6c756 100644
--- a/libavformat/aiffenc.c
+++ b/libavformat/aiffenc.c
@@ -25,6 +25,7 @@
#include "aiff.h"
#include "avio_internal.h"
#include "isom.h"
+#include "rawenc.h"
typedef struct {
int64_t form;
@@ -118,13 +119,6 @@ static int aiff_write_header(AVFormatContext *s)
return 0;
}
-static int aiff_write_packet(AVFormatContext *s, AVPacket *pkt)
-{
- AVIOContext *pb = s->pb;
- avio_write(pb, pkt->data, pkt->size);
- return 0;
-}
-
static int aiff_write_trailer(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
@@ -170,7 +164,7 @@ AVOutputFormat ff_aiff_muxer = {
.audio_codec = AV_CODEC_ID_PCM_S16BE,
.video_codec = AV_CODEC_ID_NONE,
.write_header = aiff_write_header,
- .write_packet = aiff_write_packet,
+ .write_packet = ff_raw_write_packet,
.write_trailer = aiff_write_trailer,
.codec_tag = (const AVCodecTag* const []){ ff_codec_aiff_tags, 0 },
};
More information about the ffmpeg-cvslog
mailing list