On 03/03/2011 06:53 PM, hz nan wrote:
> hi, all
>
> In my program, I hava more than three thread using avcodec_open/close. In
> the running, it gets error as below.
> insufficient thread locking around avcodec_open/close().
> I use the same mutex lock the call as below.
> avcodec.lock();
> avcodec_close(pCodecCtx);
>
> avcodec.unlock();
>
> or
>
> avcodec.lock();
>
>  while(avcodec_open(pCodecCtx,pCodec)<0);
>
> avcodec.unlock();
>
>
> But the error still appear sometimes. What should I do for this question.
>
I had a similar problem.  I found that calls to av_find_stream_info() also 
needed the lock.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to