fixed OpenStream bug when connected to a non-tc module

pull/8/head
Tom Early 4 years ago
parent 8f45a69bd2
commit 7bb96eb53c

@ -63,7 +63,7 @@
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_REVISION 4 #define VERSION_REVISION 5
// global ------------------------------------------------------ // global ------------------------------------------------------

@ -60,19 +60,10 @@ bool CPacketStream::OpenPacketStream(const CDvHeaderPacket &DvHeader, std::share
if (std::string::npos != std::string(TRANSCODED_MODULES).find(mod)) if (std::string::npos != std::string(TRANSCODED_MODULES).find(mod))
{ {
m_CodecStream = std::unique_ptr<CCodecStream>(new CCodecStream(this, m_uiStreamId, DvHeader.GetCodecIn(), m_TCReader)); m_CodecStream = std::unique_ptr<CCodecStream>(new CCodecStream(this, m_uiStreamId, DvHeader.GetCodecIn(), m_TCReader));
return true;
}
else
{
std::cerr << "Could not find module '" << mod << " in the transcoded list, '" << TRANSCODED_MODULES << "'" << std::endl;
return false;
} }
} }
else
return true;
#else
return true;
#endif #endif
return true;
} }
return false; return false;
@ -102,7 +93,7 @@ void CPacketStream::Push(std::unique_ptr<CPacket> Packet)
} }
// transcoder avaliable ? // transcoder avaliable ?
#ifdef TRANSCODED_MODULES #ifdef TRANSCODED_MODULES
if ( m_CodecStream != nullptr ) if ( m_CodecStream )
{ {
// todo: verify no possibilty of double lock here // todo: verify no possibilty of double lock here
m_CodecStream->Lock(); m_CodecStream->Lock();

Loading…
Cancel
Save

Powered by TurnKey Linux.