mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-14 11:53:16 +00:00
libcamera: remove unused buffer variable in LibCamera::stop()
To fix build warning about a variable being unused in LibCamera::stop(): [1/2] Compiling C++ object spa/plugins/libcamera/libspa-libcamera.so.p/libcamera_wrapper.cpp.o ../spa/plugins/libcamera/libcamera_wrapper.cpp: In member function ‘void LibCamera::stop()’: ../spa/plugins/libcamera/libcamera_wrapper.cpp:531:58: warning: unused variable ‘buffer’ [-Wunused-variable] 531 | for (const std::unique_ptr<FrameBuffer> &buffer : this->allocator_->buffers(stream)) { | ^~~~~~
This commit is contained in:
parent
5471a0018b
commit
76cb5c1169
|
@ -524,13 +524,12 @@ extern "C" {
|
|||
void LibCamera::stop() {
|
||||
this->disconnect();
|
||||
|
||||
uint32_t bufIdx = 0;
|
||||
StreamConfiguration &cfg = this->config_->at(0);
|
||||
Stream *stream = cfg.stream();
|
||||
uint32_t nbuffers = this->allocator_->buffers(stream).size();
|
||||
|
||||
for (const std::unique_ptr<FrameBuffer> &buffer : this->allocator_->buffers(stream)) {
|
||||
for (uint32_t bufIdx = 0; bufIdx < nbuffers; bufIdx++) {
|
||||
delete [] this->fd_[bufIdx];
|
||||
bufIdx++;
|
||||
}
|
||||
delete [] this->fd_;
|
||||
|
||||
|
|
Loading…
Reference in a new issue