Delay video decode until we have enough packets.

This commit is contained in:
oioitff authored and Unknown W. Brackets committed 2013-06-14 01:16:59 -07:00
1 parent 6192feb27a
commit 23cefa03c6
1 file changed
+1 -1
+1 -1
View File
@@ -291,7 +291,7 @@ int MediaEngine::addStreamData(u8* buffer, int addSize) {
if (size > 0 && m_pdata) {
memcpy(m_pdata + m_readSize, buffer, size);
m_readSize += size;
if (!m_pFormatCtx && m_readSize > 0x2000)
if (!m_pFormatCtx && (m_readSize > 0x20000 || m_readSize >= m_streamSize))
openContext();
if (m_demux) {
m_demux->setReadSize(m_readSize);