Re: [flac-dev] 2GB limit patch

2014-09-27 Thread JonY
On 3/5/2013 09:57, nu774 wrote: > 2. i686-pc-mingw also needs fseeko()/ftello() definitions (only > fseeko64() and ftello64() available). Not true for i686-w64-mingw32, it has Linux style LFS64 with _FILE_OFFSET_BITS. signature.asc Description: OpenPGP digital signature _

Re: [flac-dev] 2GB limit patch

2013-03-06 Thread nu774
(2013/03/06 17:43), Brian Willoughby wrote: > That's an awful "solution" waiting for errors to be introduced into > what might otherwise be valid files. > > There is no way for a RIFF/WAVE to exceed 4 GB because all chunks > must be enclosed within a global chunk, which is limited to a 32-bit > si

Re: [flac-dev] 2GB limit patch

2013-03-06 Thread Erik de Castro Lopo
Brian Willoughby wrote: > What about fseeko()? I use that in my ObjC library for converting > between AIFF, FLAC, and WAVE. It takes an unsigned 32-bit offset, as > contrasted with fseek() classic. Unless you need negative offsets, > that seems like a simple change. > > FLAC__stream_decoder

Re: [flac-dev] 2GB limit patch

2013-03-06 Thread Brian Willoughby
On Mar 6, 2013, at 00:55, Erik de Castro Lopo wrote: > Brian Willoughby wrote: > >> I do not see the need to jump to 64-bit merely to get beyond the 2 GB >> limit. There are modern API that handle 32-bit unsigned file lengths >> - i.e., up to 4 GB - without going to 64-bit. > > When we are talking

Re: [flac-dev] 2GB limit patch

2013-03-06 Thread Erik de Castro Lopo
Brian Willoughby wrote: > That's an awful "solution" waiting for errors to be introduced into > what might otherwise be valid files. I agree that this solution is non-optimal, but it is a a solution that works in most cases where the file is over 4 Gig. Furthermore, its optional; you have to ex

Re: [flac-dev] 2GB limit patch

2013-03-06 Thread Martijn van Beurden
On 06-03-13 09:43, Brian Willoughby wrote: > There is no way for a RIFF/WAVE to exceed 4 GB because all chunks must > be enclosed within a global chunk, which is limited to a 32-bit size. I agree it's ugly, but if you take a look at the FLAC bug tracker or the thread on HydrogenAudio that has be

Re: [flac-dev] 2GB limit patch

2013-03-06 Thread Erik de Castro Lopo
Brian Willoughby wrote: > I do not see the need to jump to 64-bit merely to get beyond the 2 GB > limit. There are modern API that handle 32-bit unsigned file lengths > - i.e., up to 4 GB - without going to 64-bit. When we are talking about offset_t we are talking about the flac C and C++ API

Re: [flac-dev] 2GB limit patch

2013-03-06 Thread Brian Willoughby
On Mar 4, 2013, at 22:50, Erik de Castro Lopo wrote: > nu774 wrote: >> (2013/03/05 12:27), Cristian Rodríguez wrote: >>> Nothing against you code, that's ugly ..but as it is a first step >>> it can >>> be forgiven :-) >>> >>> I will just force flac to be built with 64 bit file offsets and just >

Re: [flac-dev] 2GB limit patch

2013-03-06 Thread Brian Willoughby
On Mar 4, 2013, at 20:03, nu774 wrote: > (2013/03/05 12:27), Cristian Rodríguez wrote: >> Nothing against you code, that's ugly ..but as it is a first step >> it can >> be forgiven :-) >> >> I will just force flac to be built with 64 bit file offsets and just >> reject any caller trying to inclu

Re: [flac-dev] 2GB limit patch

2013-03-06 Thread Brian Willoughby
On Mar 4, 2013, at 14:39, Timothy B. Terriberry wrote: > Erik de Castro Lopo wrote: >> Err, thats a link to a post talking about flac's WAV reader being >> limited >> to 4Gig files. Problem is, *all* WAV files greater than 4Gig are >> mal-formed. >> Due to limitations in the way WAV files are

Re: [flac-dev] 2GB limit patch

2013-03-04 Thread Erik de Castro Lopo
nu774 wrote: > (2013/03/05 12:27), Cristian Rodríguez wrote: > > Nothing against you code, that's ugly ..but as it is a first step it can > > be forgiven :-) > > > > I will just force flac to be built with 64 bit file offsets and just > > reject any caller trying to include/link libflac into a non

Re: [flac-dev] 2GB limit patch

2013-03-04 Thread Erik de Castro Lopo
nu774 wrote: > (2013/03/05 7:19), Erik de Castro Lopo wrote: > > Err, thats a link to a post talking about flac's WAV reader being limited > > to 4Gig files. Problem is, *all* WAV files greater than 4Gig are mal-formed. > > Due to limitations in the way WAV files are specified, no valid WAV file >

Re: [flac-dev] 2GB limit patch

2013-03-04 Thread nu774
(2013/03/05 12:27), Cristian Rodríguez wrote: > Nothing against you code, that's ugly ..but as it is a first step it can > be forgiven :-) > > I will just force flac to be built with 64 bit file offsets and just > reject any caller trying to include/link libflac into a non-lfs program > like > > ht

Re: [flac-dev] 2GB limit patch

2013-03-04 Thread Cristian Rodríguez
On 03/04/2013 10:57 PM, nu774 wrote: >> This is an older issue reported in 2007: >> http://lists.xiph.org/pipermail/flac-dev/2007-September/002423.html >> >> The fix would be to use _ftelli64 instead of ftell with Visual Studio. >> http://msdn.microsoft.com/en-us/library/0ys3hc0b%28v=vs.110%29.aspx

Re: [flac-dev] 2GB limit patch

2013-03-04 Thread nu774
(2013/03/05 7:19), Erik de Castro Lopo wrote: > Err, thats a link to a post talking about flac's WAV reader being limited > to 4Gig files. Problem is, *all* WAV files greater than 4Gig are mal-formed. > Due to limitations in the way WAV files are specified, no valid WAV file > can ever be over 4Gig

Re: [flac-dev] 2GB limit patch

2013-03-04 Thread nu774
> This is an older issue reported in 2007: > http://lists.xiph.org/pipermail/flac-dev/2007-September/002423.html > > The fix would be to use _ftelli64 instead of ftell with Visual Studio. > http://msdn.microsoft.com/en-us/library/0ys3hc0b%28v=vs.110%29.aspx That's not enough. At least, the followi

Re: [flac-dev] 2GB limit patch

2013-03-04 Thread Cristian Adam
On 3/4/2013 11:26 PM, Martijn van Beurden wrote: > On 04-03-13 23:19, Erik de Castro Lopo wrote: >> Link please? > http://www.hydrogenaudio.org/forums/index.php?showtopic=99757 > >> Err, thats a link to a post talking about flac's WAV reader being limited >> to 4Gig files. Problem is, *all* WAV fil

Re: [flac-dev] 2GB limit patch

2013-03-04 Thread Timothy B. Terriberry
Erik de Castro Lopo wrote: > Err, thats a link to a post talking about flac's WAV reader being limited > to 4Gig files. Problem is, *all* WAV files greater than 4Gig are mal-formed. > Due to limitations in the way WAV files are specified, no valid WAV file > can ever be over 4Gig. And most don't w

Re: [flac-dev] 2GB limit patch

2013-03-04 Thread Martijn van Beurden
On 04-03-13 23:19, Erik de Castro Lopo wrote: > Link please? http://www.hydrogenaudio.org/forums/index.php?showtopic=99757 > Err, thats a link to a post talking about flac's WAV reader being limited > to 4Gig files. Problem is, *all* WAV files greater than 4Gig are mal-formed. > Due to limitation

Re: [flac-dev] 2GB limit patch

2013-03-04 Thread Erik de Castro Lopo
Martijn van Beurden wrote: > I was reading the discussion about this 1.3.0pre1 release on > HydrogenAudio Link please? > and someone linked an old thread in which one patched FLAC > 1.2.1 to support WAV-files larger then 2GB. It might be worth investigating: > > http://www.hydrogenaudio.org/f

[flac-dev] 2GB limit patch

2013-03-04 Thread Martijn van Beurden
Hi all, I was reading the discussion about this 1.3.0pre1 release on HydrogenAudio and someone linked an old thread in which one patched FLAC 1.2.1 to support WAV-files larger then 2GB. It might be worth investigating: http://www.hydrogenaudio.org/forums/?showtopic=84014#entry725304 ___