mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 16:45:07 +03:00
libcamera: camera: Fix std::ostringstream initialisation
We use the std::ostringstream class to generate log messages in the Camera class. The stream is initialised with initial content, but is not opened without seeking to the end, which results in the content being overwritten immediately. Fix it by opening the stream with std::ios_base::ate. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
0085202fe2
commit
ba5d2c871a
1 changed files with 2 additions and 2 deletions
|
@ -560,7 +560,7 @@ Camera::streamConfiguration(const std::vector<StreamUsage> &usages)
|
|||
|
||||
CameraConfiguration config = pipe_->streamConfiguration(this, usages);
|
||||
|
||||
std::ostringstream msg("streams configuration:");
|
||||
std::ostringstream msg("streams configuration:", std::ios_base::ate);
|
||||
unsigned int index = 0;
|
||||
|
||||
for (Stream *stream : config) {
|
||||
|
@ -614,7 +614,7 @@ int Camera::configureStreams(const CameraConfiguration &config)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
std::ostringstream msg("configuring streams:");
|
||||
std::ostringstream msg("configuring streams:", std::ios_base::ate);
|
||||
unsigned int index = 0;
|
||||
|
||||
for (Stream *stream : config) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue