]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/mem.h
lavc: clear AVBuffers on decoded frames if refcounted_frames is not set
[ffmpeg] / libavutil / mem.h
index 4f14f27a91ec932b1f93df3806ccff36d93f9249..8f4722447d396be39a44f7d6e4ce80b4cc913b45 100644 (file)
@@ -27,6 +27,7 @@
 #define AVUTIL_MEM_H
 
 #include <limits.h>
+#include <stdint.h>
 
 #include "attributes.h"
 #include "avutil.h"
@@ -164,6 +165,17 @@ char *av_strdup(const char *s) av_malloc_attrib;
  */
 void av_freep(void *ptr);
 
+/**
+ * @brief deliberately overlapping memcpy implementation
+ * @param dst destination buffer
+ * @param back how many bytes back we start (the initial size of the overlapping window)
+ * @param cnt number of bytes to copy, must be >= 0
+ *
+ * cnt > back is valid, this will copy the bytes we just copied,
+ * thus creating a repeating pattern with a period length of back.
+ */
+void av_memcpy_backptr(uint8_t *dst, int back, int cnt);
+
 /**
  * @}
  */