Hi Kieran,

indeed, thank you. Thought that file was removed, instead it was just moved to another directory. Sent a v2 with ported patch

Am 27.03.23 um 17:49 schrieb Kieran Bingham:
Hi Markus,

Quoting Markus Volk (2023-03-25 06:16:39)
Signed-off-by: Markus Volk <f_...@t-online.de>
---
  ...le_sink.cpp-Avoid-dangling-reference.patch | 46 -------------------
  ...{libcamera_0.0.1.bb => libcamera_0.0.4.bb} |  7 +--
  2 files changed, 2 insertions(+), 51 deletions(-)
  delete mode 100644 
meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch
I don't think this has been fully resolved yet, so I suspect you need to
keep this patch to be able to build with gcc-13.

 From what I recall, we're waiting to identify if this will be fixed by
GCC before it's released.

--
Kieran


  rename meta-multimedia/recipes-multimedia/libcamera/{libcamera_0.0.1.bb => 
libcamera_0.0.4.bb} (89%)

diff --git 
a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch
 
b/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch
deleted file mode 100644
index 5aa6ee8d3..000000000
--- 
a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 0e97896e6a09957f27125957d00b5150ec90b2e9 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.k...@gmail.com>
-Date: Tue, 24 Jan 2023 01:18:25 -0800
-Subject: [PATCH] file_sink.cpp: Avoid dangling-reference
-
-Fixes following errors with gcc-13
-
-../git/src/cam/file_sink.cpp:92:45: error: possibly dangling reference to a 
temporary [-Werror=dangling-reference]
-   92 |                 const FrameMetadata::Plane &meta = 
buffer->metadata().planes()[i];
-      |                                             ^~~~
-../git/src/cam/file_sink.cpp:92:81: note: the temporary was destroyed at the end of the full 
expression '(& 
buffer->libcamera::FrameBuffer::metadata())->libcamera::FrameMetadata::planes().libcamera::Span<const
 libcamera::FrameMetadata::Plane>::operator[](i)'
-   92 |                 const FrameMetadata::Plane &meta = 
buffer->metadata().planes()[i];
-      |                                                                        
         ^
-cc1plus: all warnings being treated as errors
-
-Upstream-Status: Submitted 
[https://lists.libcamera.org/pipermail/libcamera-devel/2023-January/036575.html]
-Signed-off-by: Khem Raj <raj.k...@gmail.com>
----
- src/cam/file_sink.cpp | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/cam/file_sink.cpp b/src/cam/file_sink.cpp
-index 45213d4a..897c4b37 100644
---- a/src/cam/file_sink.cpp
-+++ b/src/cam/file_sink.cpp
-@@ -89,13 +89,13 @@ void FileSink::writeBuffer(const Stream *stream, 
FrameBuffer *buffer)
-       Image *image = mappedBuffers_[buffer].get();
-
-       for (unsigned int i = 0; i < buffer->planes().size(); ++i) {
--              const FrameMetadata::Plane &meta = 
buffer->metadata().planes()[i];
-+              unsigned int bytesused = 
buffer->metadata().planes()[i].bytesused;
-
-               Span<uint8_t> data = image->data(i);
--              unsigned int length = std::min<unsigned int>(meta.bytesused, 
data.size());
-+              unsigned int length = std::min<unsigned int>(bytesused, 
data.size());
-
--              if (meta.bytesused > data.size())
--                      std::cerr << "payload size " << meta.bytesused
-+              if (bytesused > data.size())
-+                      std::cerr << "payload size " << bytesused
-                                 << " larger than plane size " << data.size()
-                                 << std::endl;
-
---
-2.39.1
-
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.1.bb 
b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.4.bb
similarity index 89%
rename from meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.1.bb
rename to meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.4.bb
index 46f058f2e..cbcc33aa4 100644
--- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.1.bb
+++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.4.bb
@@ -8,12 +8,9 @@ LIC_FILES_CHKSUM = "\
      
file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \
  "
-SRC_URI = " \
-        
git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \
-        file://0001-file_sink.cpp-Avoid-dangling-reference.patch \
-"
+SRC_URI = 
"git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master"
-SRCREV = "a83aed77df1258e469c0eb42d9cb4f1938db53f2"
+SRCREV = "6cf637eb253a68edebe59505bea55435fafb00cd"
PE = "1" --
2.34.1





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#101794): 
https://lists.openembedded.org/g/openembedded-devel/message/101794
Mute This Topic: https://lists.openembedded.org/mt/97839322/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to