[FFmpeg-devel] [PATCH 01/13] avcodec/vp9: Do not destroy uninitialized mutexes/conditions

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Fri Sep 3 17:11:00 EEST 2021


Steve Lhomme:
> On 2021-09-02 17:34, Andreas Rheinhardt wrote:
>> Also do not destroy and reinitialize mutexes and conditions when
>> certain input parameters change. Given that the decoder did not
>> create these variables at all during init, uninitialized mutexes
>> and conditions are destroyed before the very first initialization.
>> This is undefined behaviour and certain threading implementations
>> like pthreadGC2 crash when it is attempted.
>>
>> Fix this by initializing these objects once during init and freeing
>> them in close.
> 
> Works for me.
> 

Ok, then I will apply this patchset tomorrow unless there are objections.

- Andreas


More information about the ffmpeg-devel mailing list