Libavcodec common: copy all planes with memcpy_data

This function may not be used at all but just to make sure.
This commit is contained in:
Martin Pulec
2021-10-20 08:23:11 +02:00
parent a779d96c6d
commit 0b621fdadc

View File

@@ -1238,9 +1238,14 @@ static void memcpy_data(char * __restrict dst_buffer, AVFrame * __restrict frame
{
UNUSED(rgb_shift);
UNUSED(width);
for (int y = 0; y < height; ++y) {
memcpy(dst_buffer + y * pitch, frame->data[0] + y * frame->linesize[0],
frame->linesize[0]);
for (int comp = 0; comp < AV_NUM_DATA_POINTERS; ++comp) {
if (frame->data[comp] == NULL) {
break;
}
for (int y = 0; y < height; ++y) {
memcpy(dst_buffer + y * pitch, frame->data[comp] + y * frame->linesize[comp],
frame->linesize[comp]);
}
}
}