Don't try to seek the video with too few packets.

Conservatively we seem to need approximately 6, which any video ought to
be longer than.
This commit is contained in:
Unknown W. Brackets 2013-12-14 11:18:08 -08:00
parent 057cad228c
commit 20b81ef552

View file

@ -333,7 +333,7 @@ int MediaEngine::addStreamData(u8* buffer, int addSize) {
m_demux->demux(m_audioStream);
}
#ifdef USE_FFMPEG
if (!m_pFormatCtx) {
if (!m_pFormatCtx && m_pdata->getQueueSize() >= 2048 * 6) {
m_pdata->get_front(m_mpegheader, sizeof(m_mpegheader));
int mpegoffset = bswap32(*(int*)(m_mpegheader + 8));
m_pdata->pop_front(0, mpegoffset);