History

avdevice/decklink: fix MSVC build issues

Purpose: Made minor changes to get the decklink avdevice code to build using Visual C++. Notes: Made changes to configure per Hendrik Leppkes's review of first and second versions of patch. Also made slight alterations per Marton Balint's reviews. Comments: -- configure: Added if enabled decklink section and setting decklink_indev_extralibs and decklink_outdev_extralibs here for both mingw and Windows. Also eliminated the setting of these variables in the mingw section earlier in the file. -- libavdevice/decklink_common.cpp: Switched the order of the include of libavformat/internal.h to workaround build issues with Visual C++. See comment in file for more details. -- libavdevice/decklink_dec.cpp: a) Rearranged the include of libavformat/internal.h (for reasons as described above). b) Made slight alteration to an argument for call to av_rescale_q() to workaround a compiler error with Visual C++. This appears to only be an issue when building C++ files with Visual C++. See comment in code for more details. -- libavdevice/decklink_enc.cpp: Rearranged the include of libavformat/internal.h (for reasons as described above).

Aaron Levinson committed 9 years ago

Commit 7f7ee861 parent f089e024 files · +35 −6Browse files

Showing the changes to libavdevice/decklink_enc.cpp (1 of 4 files). Show all

Unified · Split

libavdevice/decklink_enc.cpp+6−1
@@ -22,11 +22,16 @@ · 21 unmodified lines
2222 #include <atomic>
2323 using std::atomic;
2424
25+/* Include internal.h first to avoid conflict between winsock.h (used by
26+ * DeckLink headers) and winsock2.h (used by libavformat) in MSVC++ builds */
27+extern "C" {
28+#include "libavformat/internal.h"
29+}
30+
2531 #include <DeckLinkAPI.h>
2632
2733 extern "C" {
2834 #include "libavformat/avformat.h"
29−#include "libavformat/internal.h"
3035 #include "libavutil/imgutils.h"
3136 }
3237

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t