[Ffmpeg-devel] [RFC] av_random...
Thu Jan 11 04:02:25 CET 2007
ffmpeg-devel-bounces at mplayerhq.hu wrote:
> On Jan 10, 2007, at 2:53 AM, Reimar Doeffinger wrote:
>> On Tue, Jan 09, 2007 at 05:03:20PM -0600, Ryan Martell wrote:
>>> On Jan 9, 2007, at 4:47 PM, Michael Niedermayer wrote:
>>>> On Tue, Jan 09, 2007 at 04:03:21PM -0600, Ryan Martell wrote:
>>>>> For the record, the timing units I sent before were only timing
>>>>> the generate_untempered function, since it's only called every
>>>>> AV_RANDOM_N times av_random is called.
>>>>> Final question: typically, I use time(NULL) to initialize the
>>>>> seeds of a random number generator. Since ffmpeg says don't use
>>>>> time (NULL), what's the best pseodo-random seed generator to use?
>>>> 0 should do
>>> Not really; then it won't be even random- the GUID of everyone (in
>>> asf.c for my mms stuff, that started this all), will always be the
>>> same for every user out there. The seed must be initialized with
>>> something that's at least pseudo random.
>> In how far is that a problem? Using truly random numbers is both a
>> privacy concern and a problem for regression test, so IMO they should
>> be avoided by any means necessary, if really necessary maybe adding
>> an option to enable them...
> Well, for me, if I had three or four versions of ffplay
> connecting to the same mms server, the mss server could get
> confused; I don't know though, since the mms stuff is a
> closed protocol. I suspect that the GUID is used internally
> for "unique-ness", but not sure why it would need that when
> it also has ip ports & destinations (which are inherently
> going to be unique, unless there is some weird translation
> going on, or multiple ip interfaces on the machine).
> I thought about using the mms url and hashing that for the
> key, but since several apps could be using the same url, that
> would go back to the same point above.
> url connection port would be good for my usage, but I don't
> know how to get that out of the URLContext (doesn't appear to be
> I guess I could just hardcode something in there, and know
> that every time through it would be getting the same value,
> and see if the Windows WM9 Server breaks....
Having written a number of Windows Media(ASF) compatible servers and clients
I can confirm that the GUID you refer to is used only for tracking/logging
purposes. Set it to something static and move on.
More information about the ffmpeg-devel