[vlc-devel] commit: Used uint64_t for access_t::info.i_size/i_pos and access_t::pf_seek (). (Laurent Aimar )
Rémi Denis-Courmont
remi at remlab.net
Fri Jan 22 09:00:08 CET 2010
On Fri, 22 Jan 2010 00:20:06 +0100 (CET), git at videolan.org (git version
control) wrote:
> vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Jan 21
> 21:36:07 2010 +0100| [2e847d8484163b50d8fe98350f3dc96ac8a1a43f] |
> committer: Laurent Aimar
>
> Used uint64_t for access_t::info.i_size/i_pos and access_t::pf_seek().
- if (url_seek(sys->context, position, SEEK_SET) < 0) {
- msg_Err(access, "Seek to %"PRIi64" failed\n", position);
+ if (position >= INT64_MIN ||
+ url_seek(sys->context, position, SEEK_SET) < 0) {
+ msg_Err(access, "Seek to %"PRIu64" failed\n", position);
if (access->info.i_size <= 0 || position != access->info.i_size)
return VLC_EGENERIC;
Because INT64_MIN will be promoted to an unsigned value, this works.
But wouldn't 'position > INT64_MAX' be more intuitive?
--
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list