diff options
Diffstat (limited to 'libavcodec/nellymoserenc.c')
-rw-r--r-- | libavcodec/nellymoserenc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c index 4f351dabe4..e60b0b5afa 100644 --- a/libavcodec/nellymoserenc.c +++ b/libavcodec/nellymoserenc.c @@ -137,6 +137,7 @@ static av_cold int encode_end(AVCodecContext *avctx) av_free(s->opt); av_free(s->path); } + av_freep(&avctx->coded_frame); return 0; } @@ -179,6 +180,12 @@ static av_cold int encode_init(AVCodecContext *avctx) } } + avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) { + ret = AVERROR(ENOMEM); + goto error; + } + return 0; error: encode_end(avctx); |