Skip to content

Commit

Permalink
avdevice/decklink_enc: use 64bit format string for BMD timebase inste…
Browse files Browse the repository at this point in the history
…ad of long long

BMDTimeValue is defined as LONGLONG on Windows, but int64_t on Linux/Mac.

Fixes format string warnings:

libavdevice/decklink_enc.cpp: In function ‘void construct_cc(AVFormatContext*, decklink_ctx*, AVPacket*, klvanc_line_set_s*)’:
libavdevice/decklink_enc.cpp:424:48: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘BMDTimeValue {aka long int}’ [-Wformat=]
                ctx->bmd_tb_num, ctx->bmd_tb_den);
                ~~~~~~~~~~~~~~~                 ^
libavdevice/decklink_enc.cpp:424:48: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 has type ‘BMDTimeValue {aka long int}’ [-Wformat=]

Signed-off-by: Marton Balint <[email protected]>
  • Loading branch information
cus committed Jul 9, 2023
1 parent 20b8688 commit f607e85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavdevice/decklink_enc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ static void construct_cc(AVFormatContext *avctx, struct decklink_ctx *ctx,

ret = klvanc_set_framerate_EIA_708B(cdp, ctx->bmd_tb_num, ctx->bmd_tb_den);
if (ret) {
av_log(avctx, AV_LOG_ERROR, "Invalid framerate specified: %lld/%lld\n",
av_log(avctx, AV_LOG_ERROR, "Invalid framerate specified: %" PRId64 "/%" PRId64 "\n",
ctx->bmd_tb_num, ctx->bmd_tb_den);
klvanc_destroy_eia708_cdp(cdp);
return;
Expand Down

0 comments on commit f607e85

Please sign in to comment.