From 28e7453c11c05f8bab3a8fa8feb7011e29274136 Mon Sep 17 00:00:00 2001
From: Aurelien Jacobs <aurel@gnuage.org>
Date: Sun, 25 Nov 2007 17:31:55 +0000
Subject: [PATCH] remove some empty close/init functions in avcodec patch by
 Alex

Originally committed as revision 11093 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/dvbsub.c    | 13 +------------
 libavcodec/dvdsubdec.c | 14 ++------------
 libavcodec/dvdsubenc.c | 13 +------------
 libavcodec/wavpack.c   |  9 +--------
 4 files changed, 5 insertions(+), 44 deletions(-)

diff --git a/libavcodec/dvbsub.c b/libavcodec/dvbsub.c
index aed7d1d4531..a1594edd037 100644
--- a/libavcodec/dvbsub.c
+++ b/libavcodec/dvbsub.c
@@ -390,16 +390,6 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s,
     return q - outbuf;
 }
 
-static int dvbsub_init_decoder(AVCodecContext *avctx)
-{
-    return 0;
-}
-
-static int dvbsub_close_decoder(AVCodecContext *avctx)
-{
-    return 0;
-}
-
 static int dvbsub_encode(AVCodecContext *avctx,
                        unsigned char *buf, int buf_size, void *data)
 {
@@ -416,7 +406,6 @@ AVCodec dvbsub_encoder = {
     CODEC_TYPE_SUBTITLE,
     CODEC_ID_DVB_SUBTITLE,
     sizeof(DVBSubtitleContext),
-    dvbsub_init_decoder,
+    NULL,
     dvbsub_encode,
-    dvbsub_close_decoder,
 };
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index b351e15d0df..ed50596563a 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -42,11 +42,6 @@ static void yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t *alpha, uint32_t *
     }
 }
 
-static int dvdsub_init_decoder(AVCodecContext *avctx)
-{
-    return 0;
-}
-
 static int decode_run_2bit(GetBitContext *gb, int *color)
 {
     unsigned int v, t;
@@ -443,11 +438,6 @@ static int find_smallest_bounding_rectangle(AVSubtitle *s)
     return 1;
 }
 
-static int dvdsub_close_decoder(AVCodecContext *avctx)
-{
-    return 0;
-}
-
 #ifdef DEBUG
 #undef fprintf
 static void ppm_save(const char *filename, uint8_t *bitmap, int w, int h,
@@ -512,8 +502,8 @@ AVCodec dvdsub_decoder = {
     CODEC_TYPE_SUBTITLE,
     CODEC_ID_DVD_SUBTITLE,
     0,
-    dvdsub_init_decoder,
     NULL,
-    dvdsub_close_decoder,
+    NULL,
+    NULL,
     dvdsub_decode,
 };
diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c
index 0dc5308eff5..77ea88c96cf 100644
--- a/libavcodec/dvdsubenc.c
+++ b/libavcodec/dvdsubenc.c
@@ -204,16 +204,6 @@ static int encode_dvd_subtitles(uint8_t *outbuf, int outbuf_size,
     return q - outbuf;
 }
 
-static int dvdsub_init_encoder(AVCodecContext *avctx)
-{
-    return 0;
-}
-
-static int dvdsub_close_encoder(AVCodecContext *avctx)
-{
-    return 0;
-}
-
 static int dvdsub_encode(AVCodecContext *avctx,
                          unsigned char *buf, int buf_size, void *data)
 {
@@ -230,7 +220,6 @@ AVCodec dvdsub_encoder = {
     CODEC_TYPE_SUBTITLE,
     CODEC_ID_DVD_SUBTITLE,
     0,
-    dvdsub_init_encoder,
+    NULL,
     dvdsub_encode,
-    dvdsub_close_encoder,
 };
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 798f6bed701..3438ee43ea4 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -364,13 +364,6 @@ static int wavpack_decode_init(AVCodecContext *avctx)
     return 0;
 }
 
-static int wavpack_decode_close(AVCodecContext *avctx)
-{
-//    WavpackContext *s = avctx->priv_data;
-
-    return 0;
-}
-
 static int wavpack_decode_frame(AVCodecContext *avctx,
                             void *data, int *data_size,
                             uint8_t *buf, int buf_size)
@@ -587,6 +580,6 @@ AVCodec wavpack_decoder = {
     sizeof(WavpackContext),
     wavpack_decode_init,
     NULL,
-    wavpack_decode_close,
+    NULL,
     wavpack_decode_frame,
 };
-- 
GitLab