[FFmpeg-devel] [PATCH 39/40] avcodec/ffv1: Simplify cleanup after allocation failure

Michael Niedermayer michael at niedermayer.cc
Wed Sep 16 21:26:17 EEST 2020


On Mon, Sep 14, 2020 at 07:27:46AM +0200, Andreas Rheinhardt wrote:
> Now that ff_ffv1_close() for both the FFV1 encoder and decoder,
> the code contained therein can be used to free the partially allocated
> slice contexts if allocating the slice contexts failed. One just has to
> set the correct number of slice contexts on error. This allows to remove
> the code for freeing partially allocated slice contexts in
> ff_ffv1_init_slice_contexts().
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  libavcodec/ffv1.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)

LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Nations do behave wisely once they have exhausted all other alternatives. 
-- Abba Eban
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200916/555e7528/attachment.sig>


More information about the ffmpeg-devel mailing list