Skip to content
Permalink
Browse files

fixup! [mmalcodec] Add back in preroll

  • Loading branch information...
popcornmix committed May 29, 2016
1 parent 05b9ffc commit 49a75ca3a32c9bb0f18c914204c4f04c1520e1dd
Showing with 4 additions and 11 deletions.
  1. +4 −11 xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.cpp
@@ -861,17 +861,12 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)
int ret = 0;

unsigned int pics = m_output_ready.size();
if (m_preroll && pics >= GetAllowedReferences())
if (m_preroll && (pics >= GetAllowedReferences() || m_codecControlFlags & DVD_CODEC_CTRL_DRAIN))
m_preroll = false;
if (pics > 0 && !m_preroll)
ret |= VC_PICTURE;
if (pics <= 1 && mmal_queue_length(m_dec_input_pool->queue) > 0 && !(m_codecControlFlags & DVD_CODEC_CTRL_DRAIN))
if ((m_preroll || pics <= 1) && mmal_queue_length(m_dec_input_pool->queue) > 0 && !(m_codecControlFlags & DVD_CODEC_CTRL_DRAIN))
ret |= VC_BUFFER;
else if (m_codecControlFlags & DVD_CODEC_CTRL_DRAIN && !ret)
ret |= VC_BUFFER;

if (!m_output_ready.empty() && !m_preroll)
ret |= VC_PICTURE;

bool slept = false;
if (!ret)
@@ -885,13 +880,11 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)
lock.Enter();
}
unsigned int pics = m_output_ready.size();
if (m_preroll && pics >= GetAllowedReferences())
if (m_preroll && (pics >= GetAllowedReferences() || m_codecControlFlags & DVD_CODEC_CTRL_DRAIN))
m_preroll = false;
if (pics > 0 && !m_preroll)
ret |= VC_PICTURE;
if (pics <= 1 && mmal_queue_length(m_dec_input_pool->queue) > 0 && !(m_codecControlFlags & DVD_CODEC_CTRL_DRAIN))
ret |= VC_BUFFER;
else if (m_codecControlFlags & DVD_CODEC_CTRL_DRAIN && !ret)
if ((m_preroll || pics <= 1) && (mmal_queue_length(m_dec_input_pool->queue) > 0 || m_codecControlFlags & DVD_CODEC_CTRL_DRAIN))
ret |= VC_BUFFER;
}

0 comments on commit 49a75ca

Please sign in to comment.
You can’t perform that action at this time.