From c3d1793f14cdaca5e2bb2103460bfdd65d352c72 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 22 Jul 2019 16:19:31 +0200 Subject: [PATCH] encoders/generic: Only check MAX_AV_PLANES --- source/encoders/generic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/encoders/generic.cpp b/source/encoders/generic.cpp index 305788f..b875f83 100644 --- a/source/encoders/generic.cpp +++ b/source/encoders/generic.cpp @@ -627,7 +627,7 @@ static inline void copy_data(encoder_frame* frame, AVFrame* vframe) int h_chroma_shift, v_chroma_shift; av_pix_fmt_get_chroma_sub_sample(static_cast(vframe->format), &h_chroma_shift, &v_chroma_shift); - for (size_t idx = 0; (idx < MAX_AV_PLANES) && (idx < AV_NUM_DATA_POINTERS); idx++) { + for (size_t idx = 0; idx < MAX_AV_PLANES; idx++) { if (!frame->data[idx] || !vframe->data[idx]) continue;