summaryrefslogtreecommitdiff
path: root/libavutil/bprint.h
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-07-26 21:37:11 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-07-28 10:49:08 +0200
commit7cf9aaddcd8d226df48ab00cb709a5e65411d566 (patch)
treed5f42140d6ed53c42a2f370f60e49f117e861843 /libavutil/bprint.h
parenta2f91e7bcd2198eb5a461a88f37d636c6845ed72 (diff)
downloadffmpeg-7cf9aaddcd8d226df48ab00cb709a5e65411d566.tar.gz
lavu/bprint: extend/clarify documentation for av_bprint_init() size_max value
Also define AV_BPRINT_SIZE_* macros before av_bprint_init() declaration, and mention them in the av_bprint_init() doxy.
Diffstat (limited to 'libavutil/bprint.h')
-rw-r--r--libavutil/bprint.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/libavutil/bprint.h b/libavutil/bprint.h
index 60e464e10b..95c47fd545 100644
--- a/libavutil/bprint.h
+++ b/libavutil/bprint.h
@@ -82,24 +82,27 @@ typedef struct AVBPrint {
} AVBPrint;
/**
+ * Convenience macros for special values for av_bprint_init() size_max
+ * parameter.
+ */
+#define AV_BPRINT_SIZE_UNLIMITED ((unsigned)-1)
+#define AV_BPRINT_SIZE_AUTOMATIC 1
+#define AV_BPRINT_SIZE_COUNT_ONLY 0
+
+/**
* Init a print buffer.
*
* @param buf buffer to init
* @param size_init initial size (including the final 0)
* @param size_max maximum size;
- * 0 means do not write anything, just count the length;
- * 1 is replaced by the maximum value for automatic storage
+ * any large value means that the internal buffer will be
+ * reallocated as needed up to that limit; -1 is converted to
+ * UINT_MAX, the largest limit possible.
+ * Check also AV_BPRINT_SIZE_* macros.
*/
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max);
/**
- * Convenience macros for special values for size_max.
- */
-#define AV_BPRINT_SIZE_UNLIMITED ((unsigned)-1)
-#define AV_BPRINT_SIZE_AUTOMATIC 1
-#define AV_BPRINT_SIZE_COUNT_ONLY 0
-
-/**
* Init a print buffer using a pre-existing buffer.
*
* The buffer will not be reallocated.