Mercurial > libavformat.hg
changeset 6265:6eead40d46a7 libavformat
url_fskip: Return an error code if the url_fseek failed
author | mstorsjo |
---|---|
date | Fri, 16 Jul 2010 23:20:03 +0000 |
parents | f4f55ad4a603 |
children | f7a3c5ea90f8 |
files | avio.h aviobuf.c |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/avio.h Fri Jul 16 22:36:01 2010 +0000 +++ b/avio.h Fri Jul 16 23:20:03 2010 +0000 @@ -358,8 +358,9 @@ /** * Skip given number of bytes forward. * @param offset number of bytes + * @return 0 on success, <0 on error */ -void url_fskip(ByteIOContext *s, int64_t offset); +int url_fskip(ByteIOContext *s, int64_t offset); /** * ftell() equivalent for ByteIOContext.
--- a/aviobuf.c Fri Jul 16 22:36:01 2010 +0000 +++ b/aviobuf.c Fri Jul 16 23:20:03 2010 +0000 @@ -182,9 +182,10 @@ return offset; } -void url_fskip(ByteIOContext *s, int64_t offset) +int url_fskip(ByteIOContext *s, int64_t offset) { - url_fseek(s, offset, SEEK_CUR); + int64_t ret = url_fseek(s, offset, SEEK_CUR); + return ret < 0 ? ret : 0; } int64_t url_ftell(ByteIOContext *s)