[FFmpeg-devel] [PATCH]Fix possible crash with -threads 0

François Revol revol
Thu Nov 25 18:48:08 CET 2010


Le 25 nov. 2010 ? 17:34, Michael Niedermayer a ?crit :

> On Tue, Nov 23, 2010 at 10:55:18PM +0100, Carl Eugen Hoyos wrote:
>> Hi!
>> 
>> 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:
http://docs.sun.com/app/docs/doc/816-5168/sysconf-3c?l=en&n=1&a=view

_SC_NPROCESSORS_MAX
_SC_NPROCESSORS_CONF
_SC_NPROCESSORS_ONLN

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:
http://www.virtualbox.org/svn/vbox/trunk/src/VBox/Runtime/r3/posix/RTMpGetCount-posix.cpp

Which answsers the question for Solaris, Haiku and BSD :)

Fran?ois.



More information about the ffmpeg-devel mailing list