diff mbox series

[FFmpeg-devel,09/10] avformat/rso: Don't reimplement ff_raw_write_packet()

Message ID 20200407214603.19798-8-andreas.rheinhardt@gmail.com
State Accepted
Commit 2cae3f60bf84e1ff4652d055885991d4f2087385
Headers show
Series [FFmpeg-devel] avformat/Makefile: Add missing rawenc dependency for iLBC muxer | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt April 7, 2020, 9:46 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/Makefile | 2 +-
 libavformat/rsoenc.c | 9 ++-------
 2 files changed, 3 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 850f250b80..554b0bfbf8 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -444,7 +444,7 @@  OBJS-$(CONFIG_ROQ_MUXER)                 += idroqenc.o rawenc.o
 OBJS-$(CONFIG_RSD_DEMUXER)               += rsd.o
 OBJS-$(CONFIG_RPL_DEMUXER)               += rpl.o
 OBJS-$(CONFIG_RSO_DEMUXER)               += rsodec.o rso.o pcm.o
-OBJS-$(CONFIG_RSO_MUXER)                 += rsoenc.o rso.o
+OBJS-$(CONFIG_RSO_MUXER)                 += rsoenc.o rso.o rawenc.o
 OBJS-$(CONFIG_RTP_MPEGTS_MUXER)          += rtpenc_mpegts.o
 OBJS-$(CONFIG_RTP_MUXER)                 += rtp.o         \
                                             rtpenc_aac.o     \
diff --git a/libavformat/rsoenc.c b/libavformat/rsoenc.c
index 3159f0c427..beba94b2a7 100644
--- a/libavformat/rsoenc.c
+++ b/libavformat/rsoenc.c
@@ -22,6 +22,7 @@ 
 
 #include "avformat.h"
 #include "internal.h"
+#include "rawenc.h"
 #include "riff.h"
 #include "rso.h"
 
@@ -63,12 +64,6 @@  static int rso_write_header(AVFormatContext *s)
     return 0;
 }
 
-static int rso_write_packet(AVFormatContext *s, AVPacket *pkt)
-{
-    avio_write(s->pb, pkt->data, pkt->size);
-    return 0;
-}
-
 static int rso_write_trailer(AVFormatContext *s)
 {
     AVIOContext *pb = s->pb;
@@ -103,7 +98,7 @@  AVOutputFormat ff_rso_muxer = {
     .audio_codec    =   AV_CODEC_ID_PCM_U8,
     .video_codec    =   AV_CODEC_ID_NONE,
     .write_header   =   rso_write_header,
-    .write_packet   =   rso_write_packet,
+    .write_packet   =   ff_raw_write_packet,
     .write_trailer  =   rso_write_trailer,
     .codec_tag      =   (const AVCodecTag* const []){ff_codec_rso_tags, 0},
     .flags          =   AVFMT_NOTIMESTAMPS,