mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
examples/dmabuf-capture: fix frame_number deprecated in FFmpeg 6.0
Fixes the following error:
../examples/dmabuf-capture.c:524:33: error: 'frame_number' is deprecated [-Werror=deprecated-declarations]
524 | ctx->avctx->frame_number, get_fifo_size(&ctx->vid_frames));
| ^~~
This commit is contained in:
parent
bec94cc040
commit
8db0d82890
1 changed files with 8 additions and 2 deletions
|
|
@ -520,8 +520,14 @@ static void *vid_encode_thread(void *arg) {
|
|||
}
|
||||
};
|
||||
|
||||
av_log(ctx, AV_LOG_INFO, "Encoded frame %i (%i in queue)\n",
|
||||
ctx->avctx->frame_number, get_fifo_size(&ctx->vid_frames));
|
||||
int64_t frame_num;
|
||||
#if LIBAVUTIL_VERSION_MAJOR >= 58
|
||||
frame_num = ctx->avctx->frame_num;
|
||||
#else
|
||||
frame_num = ctx->avctx->frame_number;
|
||||
#endif
|
||||
av_log(ctx, AV_LOG_INFO, "Encoded frame %"PRIi64" (%i in queue)\n",
|
||||
frame_num, get_fifo_size(&ctx->vid_frames));
|
||||
|
||||
} while (!ctx->err);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue