mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1058944 - Crash in webrtc::ViEInputManager::CreateCaptureDevice
This commit is contained in:
parent
6b95016a80
commit
644faa66e6
@ -351,7 +351,7 @@ VideoCaptureModule::DeviceInfo* DesktopCaptureImpl::CreateDeviceInfo(const int32
|
||||
}
|
||||
|
||||
const char* DesktopCaptureImpl::CurrentDeviceName() const {
|
||||
return _deviceUniqueId;
|
||||
return _deviceUniqueId.c_str();
|
||||
}
|
||||
|
||||
int32_t DesktopCaptureImpl::ChangeUniqueId(const int32_t id) {
|
||||
@ -400,6 +400,8 @@ int32_t DesktopCaptureImpl::Init(const char* uniqueId,
|
||||
MouseCursorMonitor *pMouseCursorMonitor = MouseCursorMonitor::CreateForWindow(webrtc::DesktopCaptureOptions::CreateDefault(), winId);
|
||||
desktop_capturer_cursor_composer_.reset(new DesktopAndCursorComposer(pWindowCapturer, pMouseCursorMonitor));
|
||||
}
|
||||
_deviceUniqueId = uniqueId;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -453,7 +455,7 @@ int32_t DesktopCaptureImpl::Process() {
|
||||
|
||||
DesktopCaptureImpl::DesktopCaptureImpl(const int32_t id)
|
||||
: _id(id),
|
||||
_deviceUniqueId(NULL),
|
||||
_deviceUniqueId(""),
|
||||
_apiCs(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||
_captureDelay(0),
|
||||
_requestedCapability(),
|
||||
@ -489,8 +491,6 @@ DesktopCaptureImpl::~DesktopCaptureImpl() {
|
||||
DeRegisterCaptureCallback();
|
||||
delete &_callBackCs;
|
||||
delete &_apiCs;
|
||||
|
||||
delete[] _deviceUniqueId;
|
||||
}
|
||||
|
||||
void DesktopCaptureImpl::RegisterCaptureDataCallback(
|
||||
|
@ -15,6 +15,8 @@
|
||||
* video_capture_impl.h
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/common_video/interface/i420_video_frame.h"
|
||||
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
||||
#include "webrtc/modules/desktop_capture/screen_capturer.h"
|
||||
@ -218,7 +220,7 @@ protected:
|
||||
int64_t capture_time);
|
||||
|
||||
int32_t _id; // Module ID
|
||||
char* _deviceUniqueId; // current Device unique name;
|
||||
std::string _deviceUniqueId; // current Device unique name;
|
||||
CriticalSectionWrapper& _apiCs;
|
||||
int32_t _captureDelay; // Current capture delay. May be changed of platform dependent parts.
|
||||
VideoCaptureCapability _requestedCapability; // Should be set by platform dependent code in StartCapture.
|
||||
|
Loading…
Reference in New Issue
Block a user