[FFmpeg-cvslog] avio: deprecate url_fskip
Anton Khirnov
git
Thu Mar 3 18:23:05 CET 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Feb 28 14:57:56 2011 +0100| [813cc7abafad646522fbcf24c5ecd00412236381] | committer: Michael Niedermayer
avio: deprecate url_fskip
avio_seek should be used instead
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
(cherry picked from commit 0300db8ad778a194b4a8ec98f6da3de5b41c46ee)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=813cc7abafad646522fbcf24c5ecd00412236381
---
libavformat/avio.h | 8 +-------
libavformat/aviobuf.c | 2 ++
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 568bdd3..cc46ad7 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -421,6 +421,7 @@ attribute_deprecated void put_tag(AVIOContext *s, const char *tag);
attribute_deprecated int url_fopen( AVIOContext **s, const char *url, int flags);
attribute_deprecated int url_fclose(AVIOContext *s);
attribute_deprecated int64_t url_fseek(AVIOContext *s, int64_t offset, int whence);
+attribute_deprecated int url_fskip(AVIOContext *s, int64_t offset);
/**
* @}
*/
@@ -469,13 +470,6 @@ 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.
- * @param offset number of bytes
- * @return 0 on success, <0 on error
- */
-int url_fskip(AVIOContext *s, int64_t offset);
-
-/**
* ftell() equivalent for AVIOContext.
* @return position or AVERROR.
*/
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index a74ad21..0c733a7 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -233,11 +233,13 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
return offset;
}
+#if FF_API_OLD_AVIO
int url_fskip(AVIOContext *s, int64_t offset)
{
int64_t ret = avio_seek(s, offset, SEEK_CUR);
return ret < 0 ? ret : 0;
}
+#endif
int64_t url_ftell(AVIOContext *s)
{
More information about the ffmpeg-cvslog
mailing list