Re: [FFmpeg-devel] [PATCH 19/25] avcodec/utils: Remove always-true check

2020-09-30 Thread Andreas Rheinhardt
Andreas Rheinhardt: > The first thing avcodec_open2() allocates is the AVCodecInternal. If > allocating it fails, a jump to end occurs; but if an error happens after > its allocation, a jump to free_and_end happens which frees all > allocations performed so far and then jumps to end. Yet free_and_e

[FFmpeg-devel] [PATCH 19/25] avcodec/utils: Remove always-true check

2020-09-26 Thread Andreas Rheinhardt
The first thing avcodec_open2() allocates is the AVCodecInternal. If allocating it fails, a jump to end occurs; but if an error happens after its allocation, a jump to free_and_end happens which frees all allocations performed so far and then jumps to end. Yet free_and_end contained a check for AVC