mmfenc: use ff_raw_write_packet()
authorPaul B Mahol <onemda@gmail.com>
Fri, 28 Dec 2012 22:18:48 +0000 (22:18 +0000)
committerPaul B Mahol <onemda@gmail.com>
Fri, 28 Dec 2012 22:21:56 +0000 (22:21 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/Makefile
libavformat/mmf.c

index 0115334..a8a368e 100644 (file)
@@ -197,7 +197,7 @@ OBJS-$(CONFIG_MLP_DEMUXER)               += rawdec.o
 OBJS-$(CONFIG_MLP_MUXER)                 += rawenc.o
 OBJS-$(CONFIG_MM_DEMUXER)                += mm.o
 OBJS-$(CONFIG_MMF_DEMUXER)               += mmf.o
-OBJS-$(CONFIG_MMF_MUXER)                 += mmf.o
+OBJS-$(CONFIG_MMF_MUXER)                 += mmf.o rawenc.o
 OBJS-$(CONFIG_MOV_DEMUXER)               += mov.o isom.o mov_chan.o
 OBJS-$(CONFIG_MOV_MUXER)                 += movenc.o isom.o avc.o \
                                             movenchint.o rtpenc_chain.o \
index 46705ac..1d5a883 100644 (file)
@@ -24,6 +24,7 @@
 #include "internal.h"
 #include "avio_internal.h"
 #include "pcm.h"
+#include "rawenc.h"
 #include "riff.h"
 
 typedef struct {
@@ -110,13 +111,6 @@ static int mmf_write_header(AVFormatContext *s)
     return 0;
 }
 
-static int mmf_write_packet(AVFormatContext *s, AVPacket *pkt)
-{
-    AVIOContext *pb = s->pb;
-    avio_write(pb, pkt->data, pkt->size);
-    return 0;
-}
-
 /* Write a variable-length symbol */
 static void put_varlength(AVIOContext *pb, int val)
 {
@@ -304,7 +298,7 @@ AVOutputFormat ff_mmf_muxer = {
     .audio_codec       = AV_CODEC_ID_ADPCM_YAMAHA,
     .video_codec       = AV_CODEC_ID_NONE,
     .write_header      = mmf_write_header,
-    .write_packet      = mmf_write_packet,
+    .write_packet      = ff_raw_write_packet,
     .write_trailer     = mmf_write_trailer,
 };
 #endif