[MPlayer-dev-eng] [PATCH] Fix too small HEADER_SEARCH_SIZE in demux_nsv.c

Soeren Sonnenburg mplayer-ml at nn7.de
Sat Apr 8 14:59:23 CEST 2006


Hi list,

Trying to play the demoscene.tv nsv at http://213.186.36.129:8000
I realized that HEADER_SEARCH_SIZE is too small in quite a number of
cases, causing the stream to not be played.

So I set HEADER_SEARCH_SIZE to some huge value and counted at which
position 'NSV' is found in the stream. Then I repeatedly connected to
this server ( >250 times). Here are the results:

minimum 'NSV' offset: 681
maximum 'NSV' offset: 950367 (!)
average 'NSV' offset: 99089
standard deviation: 125789

As currently HEADER_SEARCH_SIZE is 65000 you - on average - won't be
able to play that stream.

The attached one-liner-patch simply sets HEADER_SEARCH_SIZE to 2097152,
which should be sufficient for all current nsv streams... 

Please apply,
Soeren
-- 
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nsv_fix.diff
Type: text/x-patch
Size: 485 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060408/a7719bd6/attachment.bin>


More information about the MPlayer-dev-eng mailing list