Hello all, I'm currently working system for streaming (DVB-)Recordings via http/get with the ICS V5 http server and delphi 7.
Most of these recordings are way bigger than 2 GB (MaxInt). The problem is easy to replicate: use VLC (videolan.org) to open a http-Stream on the http server demo and set the clientcnx.document to a TS/MPG recording bigger than 2GB, it simply won't play, smaller recordings play without problems. I believe all versions of ICS have these problems (at least with Delphi 7 but I don't think integer or longword are suddenly Int64 in newer delphi versions). The following routines have problems: - THttpRangeStream.AddPartStream(Value: TStream; AStartPos, AEndPos: Integer); Integer should be THttpRangeInt - THttpRangeStream.Read(var Buffer; Count: Longint): Integer; Result := FSize - FPosition; // don't -> Overflow, use seperate Variable -> THttpRangeInt ActSize := min(Count - DataRead, Rec.Size - (ActOffset)); //Overflow because min only handles Integer. - THttpConnection.ConnectionDataSent(Sender : TObject; Error : WORD); var Count : Integer; ToSend : Integer; // Overflow in both use THttpRangeInt instead. - procedure ParseRangeString(var FromStr : String; var ToStr : String; const Value : String); Don't use StrToInt, Use StrToInt64 - THttpRangeList.InitFromString(AStr: String); Don't use StrToInt, Use StrToInt64 After these corrections, ICS works flawless, even jumping around in a 16 GB HDTV Recording works without glitches. I simply love ICS! ;) Greetings Lars -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be