[FFmpeg-devel] [PATCH] avutil/frame: fix av_frame_get_buffer's doc
liudingming
liudingming at bytedance.com
Sat Jun 26 23:12:21 EEST 2021
av_frame_get_buffer can be used with channels set.
Signed-off-by: liudingming <liudingming at bytedance.com>
---
libavutil/frame.h | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/libavutil/frame.h b/libavutil/frame.h
index ff2540a20f..40523aff71 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -722,9 +722,16 @@ void av_frame_move_ref(AVFrame *dst, AVFrame *src);
* Allocate new buffer(s) for audio or video data.
*
* The following fields must be set on frame before calling this function:
- * - format (pixel format for video, sample format for audio)
- * - width and height for video
- * - nb_samples and channel_layout for audio
+ *
+ * Video:
+ * - format (pixel format)
+ * - width
+ * - height
+ *
+ * Audio:
+ * - format (sample format)
+ * - nb_samples
+ * - channel_layout or channels
*
* This function will fill AVFrame.data and AVFrame.buf arrays and, if
* necessary, allocate and fill AVFrame.extended_data and AVFrame.extended_buf.
--
2.28.0
More information about the ffmpeg-devel
mailing list