mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-06 01:07:36 +08:00
avdevice/decklink_dec: use decklink_ctx->raw_format as bmdPixelFormat
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@@ -272,7 +272,7 @@ int ff_decklink_set_format(AVFormatContext *avctx,
|
||||
#if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b050000
|
||||
if (direction == DIRECTION_IN) {
|
||||
BMDDisplayMode actualMode = ctx->bmd_mode;
|
||||
if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, (BMDPixelFormat) cctx->raw_format,
|
||||
if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, ctx->raw_format,
|
||||
bmdNoVideoInputConversion, bmdSupportedVideoModeDefault,
|
||||
&actualMode, &support) != S_OK || !support || ctx->bmd_mode != actualMode)
|
||||
return -1;
|
||||
@@ -286,7 +286,7 @@ int ff_decklink_set_format(AVFormatContext *avctx,
|
||||
return 0;
|
||||
#elif BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
|
||||
if (direction == DIRECTION_IN) {
|
||||
if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, (BMDPixelFormat) cctx->raw_format,
|
||||
if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, ctx->raw_format,
|
||||
bmdSupportedVideoModeDefault,
|
||||
&support) != S_OK)
|
||||
return -1;
|
||||
@@ -303,7 +303,7 @@ int ff_decklink_set_format(AVFormatContext *avctx,
|
||||
return 0;
|
||||
#else
|
||||
if (direction == DIRECTION_IN) {
|
||||
if (ctx->dli->DoesSupportVideoMode(ctx->bmd_mode, (BMDPixelFormat) cctx->raw_format,
|
||||
if (ctx->dli->DoesSupportVideoMode(ctx->bmd_mode, ctx->raw_format,
|
||||
bmdVideoOutputFlagDefault,
|
||||
&support, NULL) != S_OK)
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user