diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2016-05-01 14:26:30 +0300 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2016-05-02 00:13:51 +0300 |
commit | 960035eefcd20637231fb4d12bebb5027657cc00 (patch) | |
tree | bf46b0a207e95941ad28e07690de9fa6fe2a0677 /src | |
parent | ca1532117e6e72724a2fee9bf03ef41994464f18 (diff) |
Don't use CAutoPtr copy constructor to suppress compilation warnings.
Diffstat (limited to 'src')
-rw-r--r-- | src/filters/muxer/BaseMuxer/BaseMuxer.cpp | 4 | ||||
-rw-r--r-- | src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp | 4 | ||||
-rw-r--r-- | src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp | 2 | ||||
-rw-r--r-- | src/filters/parser/BaseSplitter/BaseSplitter.cpp | 9 |
4 files changed, 10 insertions, 9 deletions
diff --git a/src/filters/muxer/BaseMuxer/BaseMuxer.cpp b/src/filters/muxer/BaseMuxer/BaseMuxer.cpp index f51a83a7b..25368cbd0 100644 --- a/src/filters/muxer/BaseMuxer/BaseMuxer.cpp +++ b/src/filters/muxer/BaseMuxer/BaseMuxer.cpp @@ -160,7 +160,7 @@ DWORD CBaseMuxerFilter::ThreadProc() continue;
}
- CAutoPtr<MuxerPacket> pPacket = GetPacket();
+ CAutoPtr<MuxerPacket> pPacket(GetPacket().Detach());
if (!pPacket) {
Sleep(1);
continue;
@@ -297,7 +297,7 @@ CAutoPtr<MuxerPacket> CBaseMuxerFilter::GetPacket() CAutoPtr<MuxerPacket> pPacket;
if (pPinMin && i == 0) {
- pPacket = pPinMin->PopPacket();
+ pPacket.Attach(pPinMin->PopPacket().Detach());
} else {
pos = m_pActivePins.GetHeadPosition();
while (pos) {
diff --git a/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp b/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp index 8cb244c52..6b1adf47a 100644 --- a/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp +++ b/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp @@ -1,6 +1,6 @@ /*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -95,7 +95,7 @@ CAutoPtr<MuxerPacket> CBaseMuxerInputPin::PopPacket() CAutoLock cAutoLock(&m_csQueue);
if (m_queue.GetCount()) {
- pPacket = m_queue.RemoveHead();
+ pPacket.Attach(m_queue.RemoveHead().Detach());
}
if (m_queue.GetCount() < MAXQUEUESIZE) {
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp index e2f2e5883..1d2946f62 100644 --- a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp +++ b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp @@ -575,7 +575,7 @@ DWORD CMatroskaMuxerFilter::ThreadProc() {
CAutoLock cAutoLock(&pPin->m_csQueue);
- b = pPin->m_blocks.RemoveHead();
+ b.Attach(pPin->m_blocks.RemoveHead().Detach());
}
if (b) {
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.cpp b/src/filters/parser/BaseSplitter/BaseSplitter.cpp index ce3072da5..54c173ba8 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitter.cpp +++ b/src/filters/parser/BaseSplitter/BaseSplitter.cpp @@ -65,7 +65,7 @@ CAutoPtr<Packet> CPacketQueue::Remove() {
CAutoLock cAutoLock(this);
ASSERT(__super::GetCount() > 0);
- CAutoPtr<Packet> p = RemoveHead();
+ CAutoPtr<Packet> p(RemoveHead().Detach());
if (p) {
m_size -= p->GetDataSize();
}
@@ -388,7 +388,8 @@ int CBaseSplitterOutputPin::QueueSize() HRESULT CBaseSplitterOutputPin::QueueEndOfStream()
{
- return QueuePacket(CAutoPtr<Packet>()); // NULL means EndOfStream
+ CAutoPtr<Packet> p;
+ return QueuePacket(p); // NULL means EndOfStream
}
HRESULT CBaseSplitterOutputPin::QueuePacket(CAutoPtr<Packet> p)
@@ -480,7 +481,7 @@ DWORD CBaseSplitterOutputPin::ThreadProc() {
CAutoLock cAutoLock(&m_queue);
if ((cnt = m_queue.GetCount()) > 0) {
- p = m_queue.Remove();
+ p.Attach(m_queue.Remove().Detach());
}
}
@@ -905,7 +906,7 @@ HRESULT CBaseSplitterFilter::DeleteOutputs() }
while (m_pOutputs.GetCount()) {
- CAutoPtr<CBaseSplitterOutputPin> pPin = m_pOutputs.RemoveHead();
+ CAutoPtr<CBaseSplitterOutputPin> pPin(m_pOutputs.RemoveHead().Detach());
if (IPin* pPinTo = pPin->GetConnected()) {
pPinTo->Disconnect();
}
|