[FFmpeg-devel] dv_read_seek over 2GB fix

Michael Niedermayer michaelni
Sat Jun 16 14:06:01 CEST 2007


Hi

On Sat, Jun 16, 2007 at 01:37:40PM +0300, Maksym Veremeyenko wrote:
> Michael Niedermayer ?????:
> 
> >> Attached patch seems fix this bug.
> > [...]
> >> -    return url_fseek(&s->pb, offset, SEEK_SET);
> >> +    return (url_fseek(&s->pb, offset, SEEK_SET) < (offset_t)0)?-1:0;
> > 
> > this is incorrect, as it kills the error code and just returns -1
> 
> What error code you are talking about? 'url_fseek' returns results of 
> calling 'lseek' (in a case of file protocol) and in a case of error 
> lseek returns (off_t)-1 and 

offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
{
[...]
        return AVERROR(EINVAL);
[...]
        offset_t res = AVERROR(EPIPE);


> this value re-returned to av_seek_frame that 
> do not care about error code - it's interesting only in sign of returned 
> value from:

its not relevant if any current code checks for specific errors or just
error vs. no error, the code should properly pass error codes

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070616/e938e17c/attachment.pgp>



More information about the ffmpeg-devel mailing list