0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-01-19 02:32:07 +00:00
Lakka-LibreELEC/projects/Amlogic/patches/ffmpeg/ffmpeg-0014-v4l2_buffers-Fix-init-of-drmprime-source-OUTPUT-buff.patch
Christian Hewitt 23942f808a ffmpeg: update Amlogic patches with recent commits from test/5.1.4/main
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
2024-03-24 14:58:21 +00:00

29 lines
1.0 KiB
Diff

From b3d4a1be1582195480c0f166744ada70f7457a5c Mon Sep 17 00:00:00 2001
From: John Cox <jc@kynesim.co.uk>
Date: Tue, 27 Feb 2024 12:57:08 +0000
Subject: [PATCH 14/14] v4l2_buffers: Fix init of drmprime source (OUTPUT)
buffers for encode
Previous fix for mmaped dmabuf CAPTURE buffers broke this due to failure
to note that dmabuf export wasn't wanted for OUTPUT buffers.
---
libavcodec/v4l2_buffers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c
index e844a1a0b6..2d1db41a30 100644
--- a/libavcodec/v4l2_buffers.c
+++ b/libavcodec/v4l2_buffers.c
@@ -1045,7 +1045,7 @@ int ff_v4l2_buffer_initialize(AVBufferRef ** pbufref, int index, V4L2Context *ct
avbuf->buf.length = avbuf->planes[0].length;
}
- if (!want_mmap) {
+ if (V4L2_TYPE_IS_CAPTURE(ctx->type) && !want_mmap) {
// export_drm does dmabuf alloc if we aren't using v4l2 alloc
ret = v4l2_buffer_export_drm(avbuf);
if (ret) {
--
2.34.1