OSDN Git Service

avio: add avio_skip macro
authorPeter Ross <pross@xvid.org>
Thu, 3 Mar 2011 11:37:05 +0000 (22:37 +1100)
committerRonald S. Bultje <rsbultje@gmail.com>
Mon, 7 Mar 2011 15:19:46 +0000 (10:19 -0500)
This is a substitute for the url_fskip function that was deprecated by
commit 0300db8ad778a194b4a8ec98f6da3de5b41c46ee. avio_fskip is provided to
improve demuxer code readability. It distinguishes the act of skipping over
unknown or irrelevant bytes from the standard avio_seek operation.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavformat/avio.h

index acdd0c1..a998808 100644 (file)
@@ -474,6 +474,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.
+ */
+#define avio_skip(s, offset) avio_seek(s, offset, SEEK_CUR)
+
+/**
  * ftell() equivalent for AVIOContext.
  * @return position or AVERROR.
  */