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
32#include "avcodec.h"32#include "avcodec.h"
33#include "gsm.h"33#include "gsm.h"
34 34
35static 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
35static av_cold int libgsm_encode_init(AVCodecContext *avctx) {42static av_cold int libgsm_encode_init(AVCodecContext *avctx) {
36 if (avctx->channels > 1) {43 if (avctx->channels > 1) {
37 av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d channels\n",44 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
77 84
78 return 0;85 return 0;
79error:86error:
80 libgsm_encode_close();87 libgsm_encode_close(avctx);
81 return -1;88 return -1;
82}89}
83 90
84static 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
91static int libgsm_encode_frame(AVCodecContext *avctx,91static int libgsm_encode_frame(AVCodecContext *avctx,
92 unsigned char *frame, int buf_size, void *data) {92 unsigned char *frame, int buf_size, void *data) {
93 // we need a full block93 // 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