[FFmpeg-devel] [PATCH]Fix possible crash with -threads 0
Fri Nov 26 11:15:29 CET 2010
On Nov 25, 2010, at 12:48 PM, Fran?ois Revol wrote:
> Le 25 nov. 2010 ? 17:34, Michael Niedermayer a ?crit :
>> On Tue, Nov 23, 2010 at 10:55:18PM +0100, Carl Eugen Hoyos wrote:
>>> Attached patch seems to fix a crash for some users (see issue 2376) - untested
>>> on Windows.
>>> Please comment, Carl Eugen
>> threads=0 means autodetect the number of threads/cpus.
>> I think this should be implemented, shouldnt be that hard. Such implementation
>> will fix this bug as a sideeffect
> Solaris has some extra sysconf() values:
> I first thought they were standardized and added them to Haiku but it seems not, it's not mentioned on the opengroup pages.
> Google came up with:
> Which answsers the question for Solaris, Haiku and BSD :)
The difficulty isn't in finding the number of CPUs but in deciding how to allocate threads.
For a normal encode ffmpeg opens four codecs (audio/video decoder/encoder), and all of them could somehow benefit from multiple threads. Since there aren't multithreaded audio codecs yet, maybe giving all the extra threads to the video encoder is best.
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
More information about the ffmpeg-devel