summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/media_object.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp
index ce77a727..b7bf048c 100644
--- a/src/libcamera/media_object.cpp
+++ b/src/libcamera/media_object.cpp
@@ -115,7 +115,8 @@ LOG_DECLARE_CATEGORY(MediaDevice)
*/
int MediaLink::setEnabled(bool enable)
{
- unsigned int flags = enable ? MEDIA_LNK_FL_ENABLED : 0;
+ unsigned int flags = (flags_ & ~MEDIA_LNK_FL_ENABLED)
+ | (enable ? MEDIA_LNK_FL_ENABLED : 0);
int ret = dev_->setupLink(this, flags);
if (ret)