History

libgsm: Fix compilation.

Move libgsm_encode_close before its first use and call it with the correct number of arguments.

Reimar Döffinger committed 14 years ago

Commit dbc7c611 parent f122cbf1 file · +8 −8Browse files

Unified · Split

libavcodec/libgsm.c+8−8
@@ -32,6 +32,13 @@ · 31 unmodified lines
3232 #include "avcodec.h"
3333 #include "gsm.h"
3434
35+static av_cold int libgsm_encode_close(AVCodecContext *avctx) {
36+ av_freep(&avctx->coded_frame);
37+ gsm_destroy(avctx->priv_data);
38+ avctx->priv_data = NULL;
39+ return 0;
40+}
41+
3542 static av_cold int libgsm_encode_init(AVCodecContext *avctx) {
3643 if (avctx->channels > 1) {
3744 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) { · 39 unmodified lines
7784
7885 return 0;
7986 error:
80− libgsm_encode_close();
87+ libgsm_encode_close(avctx);
8188 return -1;
8289 }
8390
84−static av_cold int libgsm_encode_close(AVCodecContext *avctx) {
85− av_freep(&avctx->coded_frame);
86− gsm_destroy(avctx->priv_data);
87− avctx->priv_data = NULL;
88− return 0;
89−}
90−
9191 static int libgsm_encode_frame(AVCodecContext *avctx,
9292 unsigned char *frame, int buf_size, void *data) {
9393 // we need a full block

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t