mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/nellymoserenc: Fix segfault when using unsupported channels/rate
NellyMoserEncodeContext.avctx is only set in init after these checks, yet it is used by encode_end(). This is a regression since0a56bfa71f
. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> (cherry picked from commit652279e35b
)
This commit is contained in:
parent
7e9b9f24df
commit
023bc5d926
@ -138,10 +138,8 @@ static av_cold int encode_end(AVCodecContext *avctx)
|
|||||||
|
|
||||||
ff_mdct_end(&s->mdct_ctx);
|
ff_mdct_end(&s->mdct_ctx);
|
||||||
|
|
||||||
if (s->avctx->trellis) {
|
av_freep(&s->opt);
|
||||||
av_freep(&s->opt);
|
av_freep(&s->path);
|
||||||
av_freep(&s->path);
|
|
||||||
}
|
|
||||||
ff_af_queue_close(&s->afq);
|
ff_af_queue_close(&s->afq);
|
||||||
av_freep(&s->fdsp);
|
av_freep(&s->fdsp);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user