Re: strange behavior of DVDFileStat

Vincent Torri <[email protected]> Mon, 6 Nov 2006 22:56:24 +0100 (CET)
Newsgroups gmane.comp.video.ogle.devel
Message-ID <[email protected]>

On Sat, 4 Nov 2006, Bj|rn Englund wrote:

> Thu Oct 26 2006, Vincent Torri wrote:
>
>
> The problem is that libdvdread is compiled with large file support
> (CFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64)
> and your program is not so off_t/size_t and so on may have different sizes.
>
> You also use the size values in the dvd_stat_t as int when they infact
> are off_t.
>
> Your get_size() function returns an int but the size of buf.size is off_t.
>
> Set your CFLAGS to largefile support as above.
> Handle the sizes as off_t not int (off_t is probably 64 bit when compiled for
> largefile).
> Change your treestore to support off_t or use some type that can handle 64bit
> gint64 perhaps.
> And change your printfs to print 64bit numbers instead of 32 (%ld -> %lld
> depending on your platform).
> Now everything should work.

Hey,

indeed, that was the problem. It works very well, now.

thank you very much :)

Vincent Torri