[vlc-devel] [vlc-commits] commit: Added support for ffmpeg-mt. (Laurent Aimar )
xxcv
xxcv07 at gmail.com
Fri May 14 05:11:24 CEST 2010
On 13/05/2010 11:09 PM, Laurent Aimar wrote:
> On Thu, 2010-05-13 at 17:11 +1000, xxcv wrote:
>>> + i_thread_count = vlc_GetCPUCount();
>>> +#ifdef HAVE_AVCODEC_VA
>>> + if( b_use_hw )
>>> + {
>>> + if( i_thread_count> 1 )
>>> + msg_Err( p_dec, "ffmpeg-hw and ffmpeg-threads options are not compatible" );
>> Is it possible to always let avcodec fall back to 1 thread count
>> automatically when hardware acceleration is in use ?
>> libavcodec will crash attempt to use hardware acceleration with multiple
>> thread counts.
>> This is a workaround to cover up a libavcodec bug right ?
> Yes, but it is not enough. With the version I used, it still segfaults
> and so I will have to disable hardware acceleration instead.
>
>>> + i_thread_count = 1;
>>> + }
>>> +#endif
>>> + msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count );
>>> + p_sys->p_context->thread_count = i_thread_count;
>> Is it possible to change the thread count after completion of function
>> InitVideoDec ?
> I don't think so, why ?
I'm just messing around with thread count to see if they can co-exists
properly.
I think you should let the MT dev know about the libavcodec hardware
acceleration decoder thread count bug and work out a solution.
More information about the vlc-devel
mailing list