From 3f8ee30e63192774cc5759d605769b5d57ba0470 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 28 Dec 2012 22:18:48 +0000 Subject: [PATCH] mmfenc: use ff_raw_write_packet() Signed-off-by: Paul B Mahol --- libavformat/Makefile | 2 +- libavformat/mmf.c | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/libavformat/Makefile b/libavformat/Makefile index 0115334868..a8a368e628 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -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 \ diff --git a/libavformat/mmf.c b/libavformat/mmf.c index 46705acb21..1d5a883c8e 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -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