avdevice/decklink_dec: add support for more pixel formats
[ffmpeg.git] / libavdevice / decklink_common.cpp
index cbb591ce64d99616f0a2234fb3daf9324fe46aa8..ff2df959095e6b35cf987f228bf489f46dce7cb7 100644 (file)
@@ -241,7 +241,7 @@ int ff_decklink_set_format(AVFormatContext *avctx,
     if (ctx->bmd_mode == bmdModeUnknown)
         return -1;
     if (direction == DIRECTION_IN) {
-        if (ctx->dli->DoesSupportVideoMode(ctx->bmd_mode, bmdFormat8BitYUV,
+        if (ctx->dli->DoesSupportVideoMode(ctx->bmd_mode, (BMDPixelFormat) cctx->raw_format,
                                            bmdVideoOutputFlagDefault,
                                            &support, NULL) != S_OK)
             return -1;