[12/13] avio: deprecate url_close_buf

Message ID 1300131546-2880-12-git-send-email-anton@khirnov.net
State Committed
Commit 35f1023592b46e608a4de1566b12268e3e9e72f0
Headers show

Commit Message

Anton Khirnov March 14, 2011, 7:39 p.m.
It's not used anywhere and its return value looks broken.
---
 libavformat/avio.h    |    4 ++--
 libavformat/aviobuf.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Ronald Bultje March 17, 2011, 2:51 a.m. | #1
Hi,

On Mon, Mar 14, 2011 at 3:39 PM, Anton Khirnov <anton@khirnov.net> wrote:
> It's not used anywhere and its return value looks broken.
> ---
>  libavformat/avio.h    |    4 ++--
>  libavformat/aviobuf.c |    2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)

OK, queued.

Ronald

Patch

diff --git a/libavformat/avio.h b/libavformat/avio.h
index 72907c2..a1630d5 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -647,10 +647,10 @@  URLContext *url_fileno(AVIOContext *s);
 attribute_deprecated int url_fget_max_packet_size(AVIOContext *s);
 
 attribute_deprecated int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags);
-#endif
 
 /** return the written or read size */
-int url_close_buf(AVIOContext *s);
+attribute_deprecated int url_close_buf(AVIOContext *s);
+#endif
 
 /**
  * Open a write only memory stream.
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index c7a1acc..7da9490 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -1025,13 +1025,13 @@  int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags)
         av_freep(s);
     return ret;
 }
-#endif
 
 int url_close_buf(AVIOContext *s)
 {
     put_flush_packet(s);
     return s->buf_ptr - s->buffer;
 }
+#endif
 
 /* output in a dynamic buffer */