Fix image copy when line sizes are not the same.

This commit is contained in:
Isaac Connor 2020-08-05 11:33:22 -04:00
parent 90671cd4e5
commit b867d0c463
1 changed files with 1 additions and 1 deletions

View File

@ -1189,7 +1189,7 @@ int FfmpegCamera::transfer_to_image(
for ( int i = 0; i < output_frame->height; i++ ) { for ( int i = 0; i < output_frame->height; i++ ) {
memcpy(image_buffer_ptr, buffer, row_size); memcpy(image_buffer_ptr, buffer, row_size);
image_buffer_ptr += row_size; image_buffer_ptr += row_size;
buffer += row_size; buffer += output_frame->linesize[0];
} }
} }
return 0; return 0;