summaryrefslogtreecommitdiffstats
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-01-31 15:40:11 +0000
committerJanne Grunau <janne-libav@jannau.net>2012-02-01 19:19:35 +0100
commit316fc7443b05f8c8b494443f2dfe590434796902 (patch)
tree7df4f98d148aa26d044101109b632316252bc93c /libavcodec/avcodec.h
parent378c5ef9ae1a504b5e363c5fa7193c3b4ca2267f (diff)
downloadffmpeg-streaming-316fc7443b05f8c8b494443f2dfe590434796902.zip
ffmpeg-streaming-316fc7443b05f8c8b494443f2dfe590434796902.tar.gz
avcodec: Add av_fast_padded_malloc().
Wrapper around av_fast_malloc() that keeps FF_INPUT_BUFFER_PADDING_SIZE zero-padded bytes at the end of the used buffer. Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index c70eb85..fcbb68a 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4071,6 +4071,15 @@ void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
/**
+ * Allocate a buffer with padding, reusing the given one if large enough.
+ *
+ * Same behaviour av_fast_malloc but the buffer has additional
+ * FF_INPUT_PADDING_SIZE at the end which will always memset to 0.
+ *
+ */
+void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
+
+/**
* Copy image src to dst. Wraps av_picture_data_copy() above.
*/
void av_picture_copy(AVPicture *dst, const AVPicture *src,
OpenPOWER on IntegriCloud