mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
Increment reference count when creating VideoSource object (#53)
This commit is contained in:
committed by
Peter Johnson
parent
cf8cab850b
commit
8c3efa5926
@@ -427,7 +427,8 @@ inline void VideoSink::SetSource(VideoSource source) {
|
||||
|
||||
inline VideoSource VideoSink::GetSource() const {
|
||||
m_status = 0;
|
||||
return VideoSource{GetSinkSource(m_handle, &m_status)};
|
||||
auto handle = GetSinkSource(m_handle, &m_status);
|
||||
return VideoSource{handle == 0 ? 0 : CopySource(handle, &m_status)};
|
||||
}
|
||||
|
||||
inline VideoProperty VideoSink::GetSourceProperty(llvm::StringRef name) {
|
||||
|
||||
Reference in New Issue
Block a user