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];