avdevice/decklink_common: properly check DoesSupportVideoMode result when trying...
authorMarton Balint <cus@passwd.hu>
Thu, 14 Mar 2019 01:13:56 +0000 (02:13 +0100)
committerMarton Balint <cus@passwd.hu>
Mon, 15 Apr 2019 20:22:31 +0000 (22:22 +0200)
Signed-off-by: Marton Balint <cus@passwd.hu>
libavdevice/decklink_common.cpp

index d3cc1eb..3902311 100644 (file)
@@ -256,7 +256,7 @@ int ff_decklink_set_format(AVFormatContext *avctx,
     } else {
         if (!ctx->supports_vanc || ctx->dlo->DoesSupportVideoMode(ctx->bmd_mode, ctx->raw_format,
                                                                   bmdVideoOutputVANC,
-                                                                  &support, NULL) != S_OK) {
+                                                                  &support, NULL) != S_OK || support != bmdDisplayModeSupported) {
             /* Try without VANC enabled */
             if (ctx->dlo->DoesSupportVideoMode(ctx->bmd_mode, ctx->raw_format,
                                                bmdVideoOutputFlagDefault,