[FFmpeg-devel] dv_read_seek over 2GB fix

Michael Niedermayer michaelni
Sat Jun 16 03:28:14 CEST 2007


Hi

On Fri, Jun 15, 2007 at 09:13:00PM +0300, Maksym Veremeyenko wrote:
> Dear Developers!
> 
> I have problem with seeking in raw dv stream over 2 GB file position. 
> The problem goes from incorrect type conversion in dv_read_seek.
> 
> If i seek to position 2147616000 in file (0x0000000080020500), 
> 'dv_read_seek' return as result value of seeking to position converting 
> to signed integer -2147351296 (0x80020500) that is treated by 
> av_seek_frame as negative value (incorrect) and begin to use 
> 'av_seek_frame_generic'.
> 
> 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

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

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- 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/915bc9d3/attachment.pgp>



More information about the ffmpeg-devel mailing list