aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-01-28 23:15:02 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-01-28 23:21:03 +0100
commitdbc7c6121e563f07b708f2facf7b623ddbfda717 (patch)
tree97134efcfdb725c0d3f12837e1e5fff136e1871e /libavcodec
parentf122cbf087d5f3af346a9c84e62123bbd3ded91e (diff)
downloadffmpeg-dbc7c6121e563f07b708f2facf7b623ddbfda717.tar.gz
libgsm: Fix compilation.
Move libgsm_encode_close before its first use and call it with the correct number of arguments. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libgsm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
index 919387492c..1a2145581a 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",
@@ -77,17 +84,10 @@ static av_cold int libgsm_encode_init(AVCodecContext *avctx) {
return 0;
error:
- libgsm_encode_close();
+ libgsm_encode_close(avctx);
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