[FFmpeg-devel,2/3] avdevice/decklink_common: properly check DoesSupportVideoMode result when trying VANC flag

Submitted by Marton Balint on April 9, 2019, 7:28 p.m.

Details

Message ID 20190409192856.5401-2-cus@passwd.hu
State Accepted
Commit f3e22e32014221d0f089f9cd2d7c6ea3e35da164
Headers show

Commit Message

Marton Balint April 9, 2019, 7:28 p.m.
Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavdevice/decklink_common.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index d3cc1eb3d1..3902311edd 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -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,