summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avio.h3
-rw-r--r--libavformat/aviobuf.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h
index a95504838c..3df9fadbf3 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -358,8 +358,9 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence);
/**
* 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.
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 9f1187efe7..d4db268225 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -182,9 +182,10 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence)
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)