From d41de1eaf574996d3540a958feb4c1d96e1e4d3e Mon Sep 17 00:00:00 2001 From: Jean-Pierre Date: Wed, 12 Jun 2024 16:12:07 +0200 Subject: [PATCH] Fix NDI video stretched --- src/modules/newtek/producer/newtek_ndi_producer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/newtek/producer/newtek_ndi_producer.cpp b/src/modules/newtek/producer/newtek_ndi_producer.cpp index 0596f57999..5dcf836ddd 100644 --- a/src/modules/newtek/producer/newtek_ndi_producer.cpp +++ b/src/modules/newtek/producer/newtek_ndi_producer.cpp @@ -199,7 +199,11 @@ struct newtek_ndi_producer : public core::frame_producer av_frame->format = AV_PIX_FMT_BGRA; break; } +#ifdef _WIN32 av_frame->width = video_frame.xres; +#else + av_frame->width = video_frame.line_stride_in_bytes; +#endif av_frame->height = video_frame.yres; NDIlib_audio_frame_interleaved_32s_t audio_frame_32s; audio_frame_32s.p_data = new int32_t[audio_frame.no_samples * audio_frame.no_channels];