On Jul 25, 2007, at 8:48 PM, Michael Niedermayer wrote:
Hi
On Thu, Jul 26, 2007 at 02:05:33AM +0200, conrad wrote:
Author: conrad Date: Thu Jul 26 02:05:32 2007 New Revision: 532
Log: Write segment UID [...] @@ -507,6 +510,9 @@ static int mkv_write_header(AVFormatCont MatroskaMuxContext *mkv = s->priv_data; ByteIOContext *pb = &s->pb; offset_t ebml_header, segment_info; + int i; + + av_init_random(av_gettime(), &mkv->rand_state);
leaks current time (=security risk ...)
What would be best way to seed the random number generator? All the other uses of av_init_random() use a constant, but the purpose of the segment UID is to be unique among segments, so that other files can refer to it. Another idea might be to use a SHA-1 hash of the frame contents, but that seems like it would slow down muxing a fair bit. -David