[FFmpeg-devel] [PATCH 1/2] avio: add avio_skip macro
Peter Ross
pross
Thu Mar 3 12:37:05 CET 2011
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.
---
libavformat/avio.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/libavformat/avio.h b/libavformat/avio.h
index cc46ad7..fc9f618 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -470,6 +470,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.
*/
--
1.7.1
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110303/52050882/attachment.pgp>
More information about the ffmpeg-devel
mailing list