[FFmpeg-devel] [PATCH] lavu/mem: extend documentation for av_dynarray_add()

Stefano Sabatini stefasab at gmail.com
Thu Apr 25 00:06:52 CEST 2013


---
 libavutil/mem.h |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/libavutil/mem.h b/libavutil/mem.h
index ced9453..8ae0939 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -191,9 +191,17 @@ void av_freep(void *ptr);
 /**
  * Add an element to a dynamic array.
  *
- * @param tab_ptr Pointer to the array.
- * @param nb_ptr  Pointer to the number of elements in the array.
- * @param elem    Element to be added.
+ * The array to add is supposed to be an array of pointers to
+ * structures, and the element to add must be a pointer to an already
+ * allocated structure.
+ *
+ * In case of success, the pointer to the array is updated in order to
+ * contain the new growed array, and the number pointed to by nb_ptr
+ * is incremented.
+ *
+ * @param tab_ptr pointer to the array to grow
+ * @param nb_ptr  pointer to the number of elements in the array
+ * @param elem    element to add
  */
 void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem);
 
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list