]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/decklink_enc.cpp
avdevice/decklink: deprecate the -list_devices option
[ffmpeg] / libavdevice / decklink_enc.cpp
index 8b621d00543e6fe3a9af0b770e7eaf1f04b69c7a..883fdeadfb86aefb5da8c0fd0fa84a6499449123 100644 (file)
@@ -197,8 +197,11 @@ static int decklink_setup_video(AVFormatContext *avctx, AVStream *st)
                " Check available formats with -list_formats 1.\n");
         return -1;
     }
-    if (ctx->dlo->EnableVideoOutput(ctx->bmd_mode,
-                                    ctx->supports_vanc ? bmdVideoOutputVANC : bmdVideoOutputFlagDefault) != S_OK) {
+    if (ctx->supports_vanc && ctx->dlo->EnableVideoOutput(ctx->bmd_mode, bmdVideoOutputVANC) != S_OK) {
+        av_log(avctx, AV_LOG_WARNING, "Could not enable video output with VANC! Trying without...\n");
+        ctx->supports_vanc = 0;
+    }
+    if (!ctx->supports_vanc && ctx->dlo->EnableVideoOutput(ctx->bmd_mode, bmdVideoOutputFlagDefault) != S_OK) {
         av_log(avctx, AV_LOG_ERROR, "Could not enable video output!\n");
         return -1;
     }
@@ -565,6 +568,7 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx)
 
     /* List available devices and exit. */
     if (ctx->list_devices) {
+        av_log(avctx, AV_LOG_WARNING, "The -list_devices option is deprecated and will be removed. Please use ffmpeg -sinks decklink instead.\n");
         ff_decklink_list_devices_legacy(avctx, 0, 1);
         return AVERROR_EXIT;
     }