diff mbox series

[FFmpeg-devel,1/3] avformat/ilbc: Don't reimplement ff_raw_write_packet

Message ID 20200402171740.19121-1-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/3] avformat/ilbc: Don't reimplement ff_raw_write_packet | expand

Checks

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

Commit Message

Andreas Rheinhardt April 2, 2020, 5:17 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/ilbc.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Michael Niedermayer April 3, 2020, 2:44 p.m. UTC | #1
On Thu, Apr 02, 2020 at 07:17:38PM +0200, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/ilbc.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)

LGTM

thx

[...]
diff mbox series

Patch

diff --git a/libavformat/ilbc.c b/libavformat/ilbc.c
index d41027174d..c778f5a5af 100644
--- a/libavformat/ilbc.c
+++ b/libavformat/ilbc.c
@@ -21,6 +21,7 @@ 
 
 #include "avformat.h"
 #include "internal.h"
+#include "rawenc.h"
 
 static const char mode20_header[] = "#!iLBC20\n";
 static const char mode30_header[] = "#!iLBC30\n";
@@ -52,12 +53,6 @@  static int ilbc_write_header(AVFormatContext *s)
     return 0;
 }
 
-static int ilbc_write_packet(AVFormatContext *s, AVPacket *pkt)
-{
-    avio_write(s->pb, pkt->data, pkt->size);
-    return 0;
-}
-
 static int ilbc_probe(const AVProbeData *p)
 {
     // Only check for "#!iLBC" which matches both formats
@@ -133,6 +128,6 @@  AVOutputFormat ff_ilbc_muxer = {
     .extensions   = "lbc",
     .audio_codec  = AV_CODEC_ID_ILBC,
     .write_header = ilbc_write_header,
-    .write_packet = ilbc_write_packet,
+    .write_packet = ff_raw_write_packet,
     .flags        = AVFMT_NOTIMESTAMPS,
 };