[FFmpeg-cvslog] Add avio_skip()
Michael Niedermayer
git
Fri Mar 11 12:50:26 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Mar 11 12:24:53 2011 +0100| [75a8e0f0ab644701061aec87f11a79fcaa8c1c29] | committer: Michael Niedermayer
Add avio_skip()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=75a8e0f0ab644701061aec87f11a79fcaa8c1c29
---
libavformat/avio.h | 6 ++++++
libavformat/aviobuf.c | 5 +++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 342980d..dd4380e 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -477,6 +477,12 @@ int avio_put_str16le(AVIOContext *s, const char *str);
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence);
/**
+ * Skip given number of bytes forward
+ * @return new position or AVERROR.
+ */
+int64_t avio_skip(AVIOContext *s, int64_t offset);
+
+/**
* ftell() equivalent for AVIOContext.
* @return position or AVERROR.
*/
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 1bdc478..e82d89c 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -233,6 +233,11 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
return offset;
}
+int64_t avio_skip(AVIOContext *s, int64_t offset)
+{
+ return avio_seek(s, offset, SEEK_CUR);
+}
+
#if FF_API_OLD_AVIO
int url_fskip(AVIOContext *s, int64_t offset)
{
More information about the ffmpeg-cvslog
mailing list