mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/ra144enc: Don't free unnecessarily
The init function of the real_144 encoder calls its own close function if a call to ff_lpc_init() fails; yet nothing has been allocated before that point and ff_lpc_init() can be expected to clean up after itself on error (the documentation does not say anything to the contrary and the current implementation can only fail if the only allocation fails, so there is nothing to clean up on error anyway), so this is unnecessary. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
2a71cbeb01
commit
8bbd97109c
@ -65,14 +65,11 @@ static av_cold int ra144_encode_init(AVCodecContext * avctx)
|
|||||||
ret = ff_lpc_init(&ractx->lpc_ctx, avctx->frame_size, LPC_ORDER,
|
ret = ff_lpc_init(&ractx->lpc_ctx, avctx->frame_size, LPC_ORDER,
|
||||||
FF_LPC_TYPE_LEVINSON);
|
FF_LPC_TYPE_LEVINSON);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto error;
|
return ret;
|
||||||
|
|
||||||
ff_af_queue_init(avctx, &ractx->afq);
|
ff_af_queue_init(avctx, &ractx->afq);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
error:
|
|
||||||
ra144_encode_close(avctx);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user