[FFmpeg-devel] [PATCH] lavf: add subfile protocol.
Nicolas George
george at nsup.org
Thu Feb 27 19:27:11 CET 2014
Le nonidi 9 ventôse, an CCXXII, Lukasz Marek a écrit :
> In file protocol lseek is used. If you pass SEEK_SET and n as new
> pos it always returns n and errno = 0. Even when seeking beyond end
> of the file or before beginning. When you look at code file.c it
> will return 0 in case seeking to position before beginning.
I think you read the code wrong. In the file protocol, as you say, lseek is
used, and it returns whatever lseek returns. After your first mail, I
checked in the specs, and I just re-checked by experiment: both confirm that
seeking below 0 is not legal and just fails with EINVAL.
Seeking past the end of the file is legal, although useless for reading.
I therefore believe this part of the patch is fine.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140227/dd7fb4f7/attachment.asc>
More information about the ffmpeg-devel
mailing list