]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/decklink_enc.cpp
Merge commit 'ab87af41636b081dd3562423999351b5444fa09e'
[ffmpeg] / libavdevice / decklink_enc.cpp
index 51059671018862443e9b5009fb42f7bd851fced8..25ce7d026c2c1785e4aa248cb61717dbdc6cf2fb 100644 (file)
 #include <atomic>
 using std::atomic;
 
+/* Include internal.h first to avoid conflict between winsock.h (used by
+ * DeckLink headers) and winsock2.h (used by libavformat) in MSVC++ builds */
+extern "C" {
+#include "libavformat/internal.h"
+}
+
 #include <DeckLinkAPI.h>
 
 extern "C" {
 #include "libavformat/avformat.h"
-#include "libavformat/internal.h"
 #include "libavutil/imgutils.h"
 }
 
@@ -167,9 +172,9 @@ static int decklink_setup_audio(AVFormatContext *avctx, AVStream *st)
                " Only 48kHz is supported.\n");
         return -1;
     }
-    if (c->channels != 2 && c->channels != 8) {
+    if (c->channels != 2 && c->channels != 8 && c->channels != 16) {
         av_log(avctx, AV_LOG_ERROR, "Unsupported number of channels!"
-               " Only stereo and 7.1 are supported.\n");
+               " Only 2, 8 or 16 channels are supported.\n");
         return -1;
     }
     if (ctx->dlo->EnableAudioOutput(bmdAudioSampleRate48kHz,