Browse Source

obs-ffmpeg: Do not include sys/timeb.h on non-Windows system

The struct timeb is used on Windows only.
Norihiro Kamae 2 years ago
parent
commit
e6d007b378
2 changed files with 3 additions and 1 deletions
  1. 3 0
      plugins/obs-ffmpeg/obs-ffmpeg-srt.h
  2. 0 1
      plugins/obs-ffmpeg/obs-ffmpeg-url.h

+ 3 - 0
plugins/obs-ffmpeg/obs-ffmpeg-srt.h

@@ -20,6 +20,9 @@
 #include "obs-ffmpeg-url.h"
 #include <srt/srt.h>
 #include <libavformat/avformat.h>
+#ifdef _WIN32
+#include <sys/timeb.h>
+#endif
 
 #define POLLING_TIME 100 /// Time in milliseconds between interrupt check
 

+ 0 - 1
plugins/obs-ffmpeg/obs-ffmpeg-url.h

@@ -6,7 +6,6 @@
 #include <libavutil/time.h>
 #include <libavutil/error.h>
 #include <stdio.h>
-#include <sys/timeb.h>
 #include <time.h>
 
 #define HTTP_PROTO "http"