[FFmpeg-devel] [PATCH 12/13] avcodec/omx: Check initializing mutexes/conditions

Martin Storsjö martin at martin.st
Thu Sep 2 23:42:27 EEST 2021


On Thu, 2 Sep 2021, Andreas Rheinhardt wrote:

> The earlier code did not properly check these initializations:
> It only recorded whether the part of init where these initializations
> are has been reached, but it did not check whether the initializations
> were successful, although destroying them would be undefined behaviour
> if they had not been initialized successfully.
> Furthermore cleanup() always locked a mutex regardless of whether there
> was any attempt to initialize these mutexes at all.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
> This is mostly untested: I only tested whether it compiles.
>
> libavcodec/omx.c | 34 +++++++++++++++++-----------------
> 1 file changed, 17 insertions(+), 17 deletions(-)

Seems to work in very brief testing, so ok with me.

// Martin



More information about the ffmpeg-devel mailing list