[FFmpeg-cvslog] pthreads: fix segfault due to the thread beimg killed before it has been allocated

avcoder ffmpeg at gmail.com
Sun Nov 27 06:28:29 CET 2011


On Sun, Nov 27, 2011 at 1:12 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sun, Nov 27, 2011 at 11:56:58AM +0800, avcoder wrote:
>> Hi, this commit breaks MinGW because 'p->thread' is defined as a struct.
>
> oops
> hopefully fixed
>

Your fix is not elegant, the following  hack would be better in my own view:

        if (*(intptr_t *)&p->thread)
            pthread_join(p->thread, NULL);

-- 
-----------------------------------------------------------------------------------------
My key fingerprint: d1:03:f5:32:26:ff:d7:3c:e4:42:e3:51:ec:92:78:b2


More information about the ffmpeg-cvslog mailing list