diff mbox

[FFmpeg-devel,01/17] avformat/spdifenc: Replace write_trailer by deinit

Message ID 20191226105342.11175-1-andreas.rheinhardt@gmail.com
State Accepted
Commit 827bdc841888cfc347e89704075589fff3a3c9aa
Headers show

Commit Message

Andreas Rheinhardt Dec. 26, 2019, 10:53 a.m. UTC
The write_trailer function doesn't write anything anyway. It only frees
memory.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/spdifenc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Michael Niedermayer Dec. 26, 2019, 9:36 p.m. UTC | #1
On Thu, Dec 26, 2019 at 11:53:26AM +0100, Andreas Rheinhardt wrote:
> The write_trailer function doesn't write anything anyway. It only frees
> memory.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/spdifenc.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

will apply

thx

[...]
diff mbox

Patch

diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c
index 4307942a44..d5f7d91e93 100644
--- a/libavformat/spdifenc.c
+++ b/libavformat/spdifenc.c
@@ -482,12 +482,11 @@  static int spdif_write_header(AVFormatContext *s)
     return 0;
 }
 
-static int spdif_write_trailer(AVFormatContext *s)
+static void spdif_deinit(AVFormatContext *s)
 {
     IEC61937Context *ctx = s->priv_data;
     av_freep(&ctx->buffer);
     av_freep(&ctx->hd_buf);
-    return 0;
 }
 
 static av_always_inline void spdif_put_16(IEC61937Context *ctx,
@@ -560,7 +559,7 @@  AVOutputFormat ff_spdif_muxer = {
     .video_codec       = AV_CODEC_ID_NONE,
     .write_header      = spdif_write_header,
     .write_packet      = spdif_write_packet,
-    .write_trailer     = spdif_write_trailer,
+    .deinit            = spdif_deinit,
     .flags             = AVFMT_NOTIMESTAMPS,
     .priv_class        = &spdif_class,
 };