extern "C" {
#include "libavformat/avformat.h"
+#include "libavutil/internal.h"
#include "libavutil/imgutils.h"
#include "avdevice.h"
}
" 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;
}
uint16_t *cdp_words;
uint16_t len;
uint8_t cc_count;
- int size, ret, i;
+ size_t size;
+ int ret, i;
const uint8_t *data = av_packet_get_side_data(pkt, AV_PKT_DATA_A53_CC, &size);
if (!data)
AVFrame *avframe = NULL, *tmp = (AVFrame *)pkt->data;
AVPacket *avpacket = NULL;
decklink_frame *frame;
- buffercount_type buffered;
+ uint32_t buffered;
HRESULT hr;
if (st->codecpar->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME) {
struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data;
struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
int sample_count = pkt->size / (ctx->channels << 1);
- buffercount_type buffered;
+ uint32_t buffered;
ctx->dlo->GetBufferedAudioSampleFrameCount(&buffered);
if (pkt->pts > 1 && !buffered)