av_frame_get_buffer can be used with channels set. Signed-off-by: liudingming <liudingm...@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 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".