diff options
| -rw-r--r-- | meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch | 44 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.5.bb (renamed from meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.4.bb) | 3 |
2 files changed, 1 insertions, 46 deletions
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 55a5977a7a..0000000000 --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | From 2eaffc9ac8b47c354404075761fe8f76fad0ced4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 24 Jan 2023 01:18:25 -0800 | ||
| 4 | Subject: [PATCH] file_sink.cpp: Avoid dangling-reference | ||
| 5 | |||
| 6 | Fixes following errors with gcc-13 | ||
| 7 | |||
| 8 | ../git/src/cam/file_sink.cpp:92:45: error: possibly dangling reference to a temporary [-Werror=dangling-reference] | ||
| 9 | 92 | const FrameMetadata::Plane &meta = buffer->metadata().planes()[i]; | ||
| 10 | | ^~~~ | ||
| 11 | ../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)' | ||
| 12 | 92 | const FrameMetadata::Plane &meta = buffer->metadata().planes()[i]; | ||
| 13 | | ^ | ||
| 14 | cc1plus: all warnings being treated as errors | ||
| 15 | |||
| 16 | Upstream-Status: Submitted [https://lists.libcamera.org/pipermail/libcamera-devel/2023-January/036575.html] | ||
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 18 | |||
| 19 | --- | ||
| 20 | src/apps/cam/file_sink.cpp | 8 ++++---- | ||
| 21 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 22 | |||
| 23 | diff --git a/src/apps/cam/file_sink.cpp b/src/apps/cam/file_sink.cpp | ||
| 24 | index b32aad24..9f4c5648 100644 | ||
| 25 | --- a/src/apps/cam/file_sink.cpp | ||
| 26 | +++ b/src/apps/cam/file_sink.cpp | ||
| 27 | @@ -114,13 +114,13 @@ void FileSink::writeBuffer(const Stream *stream, FrameBuffer *buffer, | ||
| 28 | } | ||
| 29 | |||
| 30 | for (unsigned int i = 0; i < buffer->planes().size(); ++i) { | ||
| 31 | - const FrameMetadata::Plane &meta = buffer->metadata().planes()[i]; | ||
| 32 | + unsigned int bytesused = buffer->metadata().planes()[i].bytesused; | ||
| 33 | |||
| 34 | Span<uint8_t> data = image->data(i); | ||
| 35 | - unsigned int length = std::min<unsigned int>(meta.bytesused, data.size()); | ||
| 36 | + unsigned int length = std::min<unsigned int>(bytesused, data.size()); | ||
| 37 | |||
| 38 | - if (meta.bytesused > data.size()) | ||
| 39 | - std::cerr << "payload size " << meta.bytesused | ||
| 40 | + if (bytesused > data.size()) | ||
| 41 | + std::cerr << "payload size " << bytesused | ||
| 42 | << " larger than plane size " << data.size() | ||
| 43 | << std::endl; | ||
| 44 | |||
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.4.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.5.bb index 12d42991eb..14a20b4317 100644 --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.4.bb +++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.5.bb | |||
| @@ -10,10 +10,9 @@ LIC_FILES_CHKSUM = "\ | |||
| 10 | 10 | ||
| 11 | SRC_URI = " \ | 11 | SRC_URI = " \ |
| 12 | git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ | 12 | git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ |
| 13 | file://0001-file_sink.cpp-Avoid-dangling-reference.patch \ | ||
| 14 | " | 13 | " |
| 15 | 14 | ||
| 16 | SRCREV = "6cf637eb253a68edebe59505bea55435fafb00cd" | 15 | SRCREV = "fb44403f1c5571549ac128c21daee9761eb9249c" |
| 17 | 16 | ||
| 18 | PE = "1" | 17 | PE = "1" |
| 19 | 18 | ||
