These headers can't be included in any arbitrary order.
Signed-off-by: Martin Storsjö <martin@martin.st>
... | ... |
@@ -19,9 +19,6 @@ |
19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | 20 |
*/ |
21 | 21 |
|
22 |
-#include <vfw.h> |
|
23 |
-#include <windows.h> |
|
24 |
- |
|
25 | 22 |
#include "libavutil/internal.h" |
26 | 23 |
#include "libavutil/log.h" |
27 | 24 |
#include "libavutil/opt.h" |
... | ... |
@@ -30,6 +27,12 @@ |
30 | 30 |
#include "libavformat/avformat.h" |
31 | 31 |
#include "libavformat/internal.h" |
32 | 32 |
|
33 |
+// windows.h must no be included before winsock2.h, and libavformat internal |
|
34 |
+// headers may include winsock2.h |
|
35 |
+#include <windows.h> |
|
36 |
+// windows.h needs to be included before vfw.h |
|
37 |
+#include <vfw.h> |
|
38 |
+ |
|
33 | 39 |
/* Some obsolete versions of MinGW32 before 4.0.0 lack this. */ |
34 | 40 |
#ifndef HWND_MESSAGE |
35 | 41 |
#define HWND_MESSAGE ((HWND) -3) |