summarylogtreecommitdiffstats
path: root/dmabuf-capture-example.patch
diff options
context:
space:
mode:
authorKeith Plant2023-03-26 12:02:51 -0400
committerKeith Plant2023-03-26 12:02:51 -0400
commit2502d9deb83663d655f24262509bdbd6131532bf (patch)
tree8a87be6f43bede13648d73ae96e1d1df51e3ba36 /dmabuf-capture-example.patch
parentba9c42cc728decbf51b2a541a8eace4aa7c235f8 (diff)
downloadaur-2502d9deb83663d655f24262509bdbd6131532bf.tar.gz
fix dmabuf example from upstream
Diffstat (limited to 'dmabuf-capture-example.patch')
-rw-r--r--dmabuf-capture-example.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/dmabuf-capture-example.patch b/dmabuf-capture-example.patch
new file mode 100644
index 000000000000..ddde38523aed
--- /dev/null
+++ b/dmabuf-capture-example.patch
@@ -0,0 +1,20 @@
+--- examples/dmabuf-capture.c 2023-02-10 17:29:59.000000000 -0500
++++ examples/dmabuf-capture.c 2023-03-26 11:58:01.738090539 -0400
+@@ -520,8 +520,15 @@
+ }
+ };
+
+- 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);
+