]> git.sesse.net Git - ffmpeg/commitdiff
avdevice/decklink_dec: fix build with older SDK
authorMarton Balint <cus@passwd.hu>
Mon, 14 Sep 2020 19:22:29 +0000 (21:22 +0200)
committerMarton Balint <cus@passwd.hu>
Tue, 15 Sep 2020 20:07:26 +0000 (22:07 +0200)
Apparently bmdFormatUnspecified needs SDK 11.0. It is just a fancy way of
checking for zero, so let's do that instead.

Fixes build issue since f1b908d20a8.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavdevice/decklink_dec.cpp

index 92b8feed1426e8b851c3d1b4373c5b1a38cf6eec..6517b9df133a6bf79e43d982a05826d0d4e8a2a0 100644 (file)
@@ -1232,7 +1232,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
         }
         av_log(avctx, AV_LOG_INFO, "Autodetected the input mode\n");
     }
-    if (ctx->raw_format == bmdFormatUnspecified)
+    if (ctx->raw_format == (BMDPixelFormat)0)
         ctx->raw_format = bmdFormat8BitYUV;
     if (ff_decklink_set_format(avctx, DIRECTION_IN) < 0) {
         av_log(avctx, AV_LOG_ERROR, "Could not set format code %s for %s\n",