From 1155fd02ae7bac215acab316e847c6bb25f74fc3 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 11 Feb 2014 14:15:20 +0100 Subject: frame: add a convenience function for copying AVFrame data --- libavutil/frame.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libavutil/frame.h') diff --git a/libavutil/frame.h b/libavutil/frame.h index 20766423f5..30cc1e47c9 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -505,6 +505,19 @@ int av_frame_is_writable(AVFrame *frame); */ int av_frame_make_writable(AVFrame *frame); +/** + * Copy the frame data from src to dst. + * + * This function does not allocate anything, dst must be already initialized and + * allocated with the same parameters as src. + * + * This function only copies the frame data (i.e. the contents of the data / + * extended data arrays), not any other properties. + * + * @return >= 0 on success, a negative AVERROR on error. + */ +int av_frame_copy(AVFrame *dst, const AVFrame *src); + /** * Copy only "metadata" fields from src to dst. * -- cgit v1.2.3