Explorar o código

win-dshow: Fix rotation not working in all cases

jp9000 %!s(int64=5) %!d(string=hai) anos
pai
achega
40817331d3
Modificáronse 1 ficheiros con 5 adicións e 5 borrados
  1. 5 5
      plugins/win-dshow/win-dshow.cpp

+ 5 - 5
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! */