summaryrefslogtreecommitdiff
path: root/libavutil/samplefmt.h
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-03-21 11:48:28 +0100
committerStefano Sabatini <stefasab@gmail.com>2013-03-31 18:00:44 +0200
commit5c73645d91e6a91c849e08e0fc58bdeab9b7b76f (patch)
tree986d39f92a94a7334cce88ceae79a6c6d7e841ee /libavutil/samplefmt.h
parent39aad4346562e208ad494093e2995d9bc8fb3410 (diff)
lavu/samplefmt: add av_samples_alloc_array_and_pointers()
Diffstat (limited to 'libavutil/samplefmt.h')
-rw-r--r--libavutil/samplefmt.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h
index 529711fc20..db17d43bcf 100644
--- a/libavutil/samplefmt.h
+++ b/libavutil/samplefmt.h
@@ -209,11 +209,24 @@ int av_samples_fill_arrays(uint8_t **audio_data, int *linesize,
* @return >=0 on success or a negative error code on failure
* @todo return the size of the allocated buffer in case of success at the next bump
* @see av_samples_fill_arrays()
+ * @see av_samples_alloc_array_and_samples()
*/
int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
int nb_samples, enum AVSampleFormat sample_fmt, int align);
/**
+ * Allocate a data pointers array, samples buffer for nb_samples
+ * samples, and fill data pointers and linesize accordingly.
+ *
+ * This is the same as av_samples_alloc(), but also allocates the data
+ * pointers array.
+ *
+ * @see av_samples_alloc()
+ */
+int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels,
+ int nb_samples, enum AVSampleFormat sample_fmt, int align);
+
+/**
* Copy samples from src to dst.
*
* @param dst destination array of pointers to data planes