Re: libdvdread: Can't seek to block 256

Felix Kurth <[email protected]>
Newsgroups gmane.comp.video.ogle.user
Message-ID <[email protected]>
The shit happens in device.c  from libdvdcss-1.2.8
on line 425
static int libc_seek( dvdcss_t dvdcss, int i_blocks )
i_blocks==256
dvdcss seems valid.

it calls on line 435 
i_seek = lseek( dvdcss->i_read_fd,
 		                    (off_t)i_blocks * (off_t)DVDCSS_BLOCK_SIZE, SEEK_SET );
where 
dvdcss->i_read_fd == 3
DVDCSS_BLOCK_SIZE=2048
SEEK_SET==0
this returns -1

in the strace i read 

_llseek(3, 524288, 0xbfffc4f0, SEEK_SET) -1 EINVAL (Invalid argument)

evaluating  "0xbfffc4f0" to decimal returns "-1073756944"
(is this a valid value  ?)

evaluating 256*2048 returns "524288" or hex "80000"

what happens in lseek ? Why comming from 80000 to -1073756944 ?
 what can i do ? Compile glibc with -q and debug deeper ?

man _llseek
says
int  _llseek(unsigned int fd, unsigned long offset_high, unsigned long 
offset_low, loff_t *result, unsigned int whence);
EINVAL: whence is invalid.

but the call in the strace has only 4 parameters, no "whence" is set ?
(my glibc ver is 2.3.2)

How can i make an executable link against a lib in an other then the
default location ?
I wont install a self-compiled glibc on my system since i dont want to break 
it.

any furhter ideas/tips what i can do ?

thanks felix


> 
> That was why I sugested you add something like
> fprintf(stderr, "I am <..> offset is %d", [lb_number|offset|block|..]); 
> to the functions that it will call (seee my previous email).
> This should give you an idea of where (if anywhere) things go wrong.
> 
> -- 
> Håkan Hjort
> 

-- 
Felix Kurth
pgp public key: http://www.fkurth.de/keys/felix.fkurth.asc
key fingerprint: D401 DCF8 2BF8 50DF 2FAD 8136 C29B 83EE C0A1 F2AD
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.