]> git.sesse.net Git - ffmpeg/commit
avcodec/utils: Remove always-true check
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 24 Sep 2020 21:24:20 +0000 (23:24 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 1 Oct 2020 10:50:57 +0000 (12:50 +0200)
commit502c5fe10143247b0566d3d2bb927f49769c2181
tree54177002c64b797e6fae836b89e82d6889eec870
parent33b4b788aac91dfd522415baaedcbda160482816
avcodec/utils: Remove always-true check

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 AVCodecInternal (after having already dereferenced
it to check whether ff_thread_free() needs to be called) which is of
course always true. So remove it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/utils.c