[PATCH] Fix too small HEADER_SEARCH_SIZE in demux_nsv.c
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
Hi, On 4/8/06, Soeren Sonnenburg <mplayer-ml@nn7.de> wrote:
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...
It does fix the problem, and RC confirmed it. I plan to apply this, as it's a trivial 'fix', unless someone disagrees. Guillaume -- I am disillusioned enough to know that no man's opinion on any subject is worth a damn unless backed up with enough genuine information to make him really know what he's talking about. -- H. P. Lovecraft (about the flamewars on FFmpeg and MPlayer-dev mailing lists) http://www.brainyquote.com/quotes/quotes/h/hplovecr278144.html
Hi, On Sat, Apr 08, 2006 at 02:59:23PM +0200, Soeren Sonnenburg wrote:
The attached one-liner-patch simply sets HEADER_SEARCH_SIZE to 2097152, which should be sufficient for all current nsv streams...
This is a rather large value, and the nsv demuxer seems to be probed quite early in the process (see list in demuxer.c, though its autodetection is already marked a non-safe). I would prefer if you tested how much it delays the detection of other formats and move it down as appropriate (maybe just in front of the MPEG demuxers or so). Greetings, Reimar Döffinger
On Sun, 9 Apr 2006 21:00:24 +0200 Reimar Döffinger <Reimar.Doeffinger@stud.uni-karlsruhe.de> wrote:
I would prefer if you tested how much it delays the detection of other formats and move it down as appropriate (maybe just in front of the MPEG demuxers or so).
I didn't do extensive testing to figure out exactly where is best, but your suggestion of right above the MPEG demuxers seems to work quite well. Trivial patch attached.
Hi, On 4/14/06, RC <rcooley@spamcop.net> wrote:
On Sun, 9 Apr 2006 21:00:24 +0200 Reimar Döffinger <Reimar.Doeffinger@stud.uni-karlsruhe.de> wrote:
I would prefer if you tested how much it delays the detection of other formats and move it down as appropriate (maybe just in front of the MPEG demuxers or so).
I didn't do extensive testing to figure out exactly where is best, but your suggestion of right above the MPEG demuxers seems to work quite well. Trivial patch attached.
Applied. It's trivial enough that nothing can go wrong applying it. Guillaume -- I am disillusioned enough to know that no man's opinion on any subject is worth a damn unless backed up with enough genuine information to make him really know what he's talking about. -- H. P. Lovecraft (about the flamewars on FFmpeg and MPlayer-dev mailing lists) http://www.brainyquote.com/quotes/quotes/h/hplovecr278144.html
participants (4)
-
Guillaume POIRIER -
RC -
Reimar Döffinger -
Soeren Sonnenburg