aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-12-28 21:57:01 +0000
committerPaul B Mahol <onemda@gmail.com>2012-12-28 21:58:03 +0000
commit8ad010a7e080cf622cbc65f8ee9f33f3360cc57e (patch)
tree94acc8f19b3c37bf7d059fd60bfd2c01079d474d /libavformat
parenta4b62f36c7d185c2e9c828f792dea59a4b12fe30 (diff)
downloadffmpeg-8ad010a7e080cf622cbc65f8ee9f33f3360cc57e.tar.gz
soxenc: use ff_raw_write_packet()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/Makefile2
-rw-r--r--libavformat/soxenc.c10
2 files changed, 3 insertions, 9 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 587fa42741..5c22c809d4 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -338,7 +338,7 @@ OBJS-$(CONFIG_SMOOTHSTREAMING_MUXER) += smoothstreamingenc.o isom.o
OBJS-$(CONFIG_SMUSH_DEMUXER) += smush.o
OBJS-$(CONFIG_SOL_DEMUXER) += sol.o pcm.o
OBJS-$(CONFIG_SOX_DEMUXER) += soxdec.o pcm.o
-OBJS-$(CONFIG_SOX_MUXER) += soxenc.o
+OBJS-$(CONFIG_SOX_MUXER) += soxenc.o rawenc.o
OBJS-$(CONFIG_SPDIF_DEMUXER) += spdif.o spdifdec.o
OBJS-$(CONFIG_SPDIF_MUXER) += spdif.o spdifenc.o
OBJS-$(CONFIG_SRT_DEMUXER) += srtdec.o
diff --git a/libavformat/soxenc.c b/libavformat/soxenc.c
index d4d3e3754f..e219d75b41 100644
--- a/libavformat/soxenc.c
+++ b/libavformat/soxenc.c
@@ -34,6 +34,7 @@
#include "libavutil/dict.h"
#include "avformat.h"
#include "avio_internal.h"
+#include "rawenc.h"
#include "sox.h"
typedef struct {
@@ -84,13 +85,6 @@ static int sox_write_header(AVFormatContext *s)
return 0;
}
-static int sox_write_packet(AVFormatContext *s, AVPacket *pkt)
-{
- AVIOContext *pb = s->pb;
- avio_write(pb, pkt->data, pkt->size);
- return 0;
-}
-
static int sox_write_trailer(AVFormatContext *s)
{
SoXContext *sox = s->priv_data;
@@ -122,6 +116,6 @@ AVOutputFormat ff_sox_muxer = {
.audio_codec = AV_CODEC_ID_PCM_S32LE,
.video_codec = AV_CODEC_ID_NONE,
.write_header = sox_write_header,
- .write_packet = sox_write_packet,
+ .write_packet = ff_raw_write_packet,
.write_trailer = sox_write_trailer,
};