Commit f870fc2f authored by Paul B Mahol's avatar Paul B Mahol Committed by Michael Niedermayer

adpcmenc: refactor some code.

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 82c25297
...@@ -58,6 +58,8 @@ typedef struct ADPCMEncodeContext { ...@@ -58,6 +58,8 @@ typedef struct ADPCMEncodeContext {
#define FREEZE_INTERVAL 128 #define FREEZE_INTERVAL 128
static av_cold int adpcm_encode_close(AVCodecContext *avctx);
static av_cold int adpcm_encode_init(AVCodecContext *avctx) static av_cold int adpcm_encode_init(AVCodecContext *avctx)
{ {
ADPCMEncodeContext *s = avctx->priv_data; ADPCMEncodeContext *s = avctx->priv_data;
...@@ -142,10 +144,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) ...@@ -142,10 +144,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
return 0; return 0;
error: error:
av_freep(&s->paths); adpcm_encode_close(avctx);
av_freep(&s->node_buf);
av_freep(&s->nodep_buf);
av_freep(&s->trellis_hash);
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment