From b867d0c4630a25ba69121bfe4497fdb2649b9a65 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 5 Aug 2020 11:33:22 -0400 Subject: [PATCH] Fix image copy when line sizes are not the same. --- src/zm_ffmpeg_camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 15a6e74c0..a7a3bc259 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -1189,7 +1189,7 @@ int FfmpegCamera::transfer_to_image( for ( int i = 0; i < output_frame->height; i++ ) { memcpy(image_buffer_ptr, buffer, row_size); image_buffer_ptr += row_size; - buffer += row_size; + buffer += output_frame->linesize[0]; } } return 0;