Skip to content

Commit a5ec340

Browse files
committed
Fix a segfault crash related to JSON-API grabber control (fixes #318)
1 parent 90a2cfa commit a5ec340

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

include/base/GrabberWrapper.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ private slots:
8080
void StateChanged(QString device, QString videoMode);
8181
void cecKeyPressed(int key);
8282
void benchmarkUpdate(int status, QString message);
83+
void setBrightnessContrastSaturationHue(int brightness, int contrast, int saturation, int hue);
8384

8485
public:
8586
int getHdrToneMappingEnabled();
@@ -93,7 +94,7 @@ public slots:
9394
void setFpsSoftwareDecimation(int decimation);
9495
void setHdrToneMappingEnabled(int mode);
9596
void setEncoding(QString enc);
96-
void setBrightnessContrastSaturationHue(int brightness, int contrast, int saturation, int hue);
97+
void setBrightnessContrastSaturationHueHandler(int brightness, int contrast, int saturation, int hue);
9798
void setQFrameDecimation(int setQframe);
9899
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
99100

sources/base/GrabberWrapper.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ GrabberWrapper::GrabberWrapper(const QString& grabberName, Grabber* ggrabber)
6161
// listen for source requests
6262
connect(GlobalSignals::getInstance(), &GlobalSignals::requestSource, this, &GrabberWrapper::handleSourceRequest);
6363

64-
connect(this, &GrabberWrapper::cecKeyPressed, this, &GrabberWrapper::cecKeyPressedHandler);
64+
connect(this, &GrabberWrapper::cecKeyPressed, this, &GrabberWrapper::cecKeyPressedHandler);
65+
66+
connect(this, &GrabberWrapper::setBrightnessContrastSaturationHue, this, &GrabberWrapper::setBrightnessContrastSaturationHueHandler);
6567

6668
}
6769

@@ -347,7 +349,7 @@ void GrabberWrapper::setEncoding(QString enc)
347349
_grabber->setEncoding(enc);
348350
}
349351

350-
void GrabberWrapper::setBrightnessContrastSaturationHue(int brightness, int contrast, int saturation, int hue)
352+
void GrabberWrapper::setBrightnessContrastSaturationHueHandler(int brightness, int contrast, int saturation, int hue)
351353
{
352354
if (_grabber != nullptr)
353355
_grabber->setBrightnessContrastSaturationHue(brightness, contrast, saturation, hue);

0 commit comments

Comments
 (0)