[FFmpeg-devel] [PATCH] Fix compilation: move libgsm_encode_close before its first use.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Jan 28 23:15:29 CET 2012


Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavcodec/libgsm.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
index 9193874..593791f 100644
--- a/libavcodec/libgsm.c
+++ b/libavcodec/libgsm.c
@@ -32,6 +32,13 @@
 #include "avcodec.h"
 #include "gsm.h"
 
+static av_cold int libgsm_encode_close(AVCodecContext *avctx) {
+    av_freep(&avctx->coded_frame);
+    gsm_destroy(avctx->priv_data);
+    avctx->priv_data = NULL;
+    return 0;
+}
+
 static av_cold int libgsm_encode_init(AVCodecContext *avctx) {
     if (avctx->channels > 1) {
         av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d channels\n",
@@ -81,13 +88,6 @@ error:
     return -1;
 }
 
-static av_cold int libgsm_encode_close(AVCodecContext *avctx) {
-    av_freep(&avctx->coded_frame);
-    gsm_destroy(avctx->priv_data);
-    avctx->priv_data = NULL;
-    return 0;
-}
-
 static int libgsm_encode_frame(AVCodecContext *avctx,
                                unsigned char *frame, int buf_size, void *data) {
     // we need a full block
-- 
1.7.8.3



More information about the ffmpeg-devel mailing list