]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/mem.h
rc4: extend av_rc4_init() doxy
[ffmpeg] / libavutil / mem.h
index 4a5e362cec5414912c4a2474874cc7cb35cf02a5..9f667c270bf314ca2e7b56b1610ab027a82e2c35 100644 (file)
@@ -217,6 +217,16 @@ av_alloc_size(1, 2) static inline void *av_mallocz_array(size_t nmemb, size_t si
  */
 char *av_strdup(const char *s) av_malloc_attrib;
 
+/**
+ * Duplicate a substring of the string s.
+ * @param s string to be duplicated
+ * @param len the maximum length of the resulting string (not counting the
+ *            terminating byte).
+ * @return Pointer to a newly-allocated string containing a
+ * copy of s or NULL if the string cannot be allocated.
+ */
+char *av_strndup(const char *s, size_t len) av_malloc_attrib;
+
 /**
  * Free a memory block which has been allocated with av_malloc(z)() or
  * av_realloc() and set the pointer pointing to it to NULL.