diff options
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 543e364abc..e31c682339 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -126,12 +126,17 @@ static int adpcm_encode_init(AVCodecContext *avctx) return -1; break; } + + avctx->coded_frame= avcodec_alloc_frame(); + avctx->coded_frame->key_frame= 1; + return 0; } static int adpcm_encode_close(AVCodecContext *avctx) { - /* nothing to free */ + av_freep(&avctx->coded_frame); + return 0; } @@ -253,7 +258,6 @@ static int adpcm_encode_frame(AVCodecContext *avctx, default: return -1; } - avctx->key_frame = 1; return dst - frame; } |