[PATCH 2/4] Document url_write().

Stefano Sabatini stefano.sabatini-lala
Sun Feb 28 00:19:23 CET 2010


---
 libavformat/avio.h |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/libavformat/avio.h b/libavformat/avio.h
index 69368de..1cc7fa0 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -132,7 +132,19 @@ int url_read(URLContext *h, unsigned char *buf, int size);
  * certain there was either an error or the end of file was reached.
  */
 int url_read_complete(URLContext *h, unsigned char *buf, int size);
-int url_write(URLContext *h, const unsigned char *buf, int size);
+
+/**
+ * Write up to size bytes from buf to the resource accessed by h.
+ * The data in buf is not necessarily a character string and a NULL
+ * character is output like any other character.
+ *
+ * @return The number of bytes actually written, or a negative value
+ * corresponding to an AVERROR code in case of failure. In case of
+ * success the returned value may be size, but can always be
+ * smaller. Your program may need to call url_write() in a loop,
+ * iterating until all the data is written.
+ */
+int url_write(URLContext *h, unsigned char *buf, int size);
 
 /**
  * Passing this as the "whence" parameter to a seek function causes it to
-- 
1.7.1


--82I3+IH0IqGh5yIs--



More information about the ffmpeg-devel mailing list