[FFmpeg-cvslog] avio: deprecate url_fgets

Anton Khirnov git
Tue Mar 8 02:43:28 CET 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Mar  6 18:04:46 2011 +0100| [de3ef79250f39f04fb194e808933509dc4a7f397] | committer: Michael Niedermayer

avio: deprecate url_fgets

It's not used anywhere and doesn't look ver useful to be public.

Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
(cherry picked from commit 655e45e7dfafc494044cc52f8889fc6da75eff6a)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de3ef79250f39f04fb194e808933509dc4a7f397
---

 libavformat/avio.h    |    4 +++-
 libavformat/aviobuf.c |    2 ++
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/libavformat/avio.h b/libavformat/avio.h
index acdd0c1..0d9f19f 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -508,9 +508,11 @@ int url_fprintf(AVIOContext *s, const char *fmt, ...) __attribute__ ((__format__
 int url_fprintf(AVIOContext *s, const char *fmt, ...);
 #endif
 
+#if FF_API_OLD_AVIO
 /** @note unlike fgets, the EOL character is not returned and a whole
     line is parsed. return NULL if first char read was EOF */
-char *url_fgets(AVIOContext *s, char *buf, int buf_size);
+attribute_deprecated char *url_fgets(AVIOContext *s, char *buf, int buf_size);
+#endif
 
 void put_flush_packet(AVIOContext *s);
 
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index e273aa5..2905724 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -915,6 +915,7 @@ int url_fprintf(AVIOContext *s, const char *fmt, ...)
 }
 #endif //CONFIG_MUXERS
 
+#if FF_API_OLD_AVIO
 char *url_fgets(AVIOContext *s, char *buf, int buf_size)
 {
     int c;
@@ -935,6 +936,7 @@ char *url_fgets(AVIOContext *s, char *buf, int buf_size)
         *q = '\0';
     return buf;
 }
+#endif
 
 int url_fget_max_packet_size(AVIOContext *s)
 {




More information about the ffmpeg-cvslog mailing list