encoders/generic: Only check MAX_AV_PLANES

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-07-22 16:19:31 +02:00
parent 57ebb9d866
commit c3d1793f14
+1 -1
View File
@@ -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<AVPixelFormat>(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;