From 40817331d38fb3dc97bb68280bfe4bee332ffebe Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 7 Mar 2020 06:48:07 -0800 Subject: [PATCH] win-dshow: Fix rotation not working in all cases --- plugins/win-dshow/win-dshow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/win-dshow/win-dshow.cpp b/plugins/win-dshow/win-dshow.cpp index 47688b9f2..e4e6ec7a4 100644 --- a/plugins/win-dshow/win-dshow.cpp +++ b/plugins/win-dshow/win-dshow.cpp @@ -522,6 +522,11 @@ void DShowInput::OnVideoData(const VideoConfig &config, unsigned char *data, size_t size, long long startTime, long long endTime, long rotation) { + if (rotation != lastRotation) { + lastRotation = rotation; + obs_source_set_async_rotation(source, rotation); + } + if (videoConfig.format == VideoFormat::H264) { OnEncodedVideoData(AV_CODEC_ID_H264, data, size, startTime); return; @@ -592,11 +597,6 @@ void DShowInput::OnVideoData(const VideoConfig &config, unsigned char *data, return; } - if (rotation != lastRotation) { - lastRotation = rotation; - obs_source_set_async_rotation(source, rotation); - } - obs_source_output_video2(source, &frame); UNUSED_PARAMETER(endTime); /* it's the enndd tiimmes! */