Skip to content
Permalink
Browse files

mmalcodec: Also wake up decoder when a new input buffer is available

  • Loading branch information...
popcornmix committed May 11, 2016
1 parent 82d0f72 commit 656a69da91d940d5d013a09b0a6318b252b6db70
Showing with 6 additions and 3 deletions.
  1. +6 −3 xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.cpp
@@ -221,6 +221,8 @@ void CMMALVideo::dec_input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buff
if (g_advancedSettings.CanLogComponent(LOGVIDEO))
CLog::Log(LOGDEBUG, "%s::%s port:%p buffer %p, len %d cmd:%x", CLASSNAME, __func__, port, buffer, buffer->length, buffer->cmd);
mmal_buffer_header_release(buffer);
CSingleLock lock(m_output_mutex);
m_output_cond.notifyAll();
}

static void dec_input_port_cb_static(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer)
@@ -865,9 +867,10 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts)
slept = true;
{
// otherwise we busy spin
CSingleExit unlock(m_sharedSection);
CSingleLock lock(m_output_mutex);
m_output_cond.wait(lock, 30);
lock.Leave();
CSingleLock output_lock(m_output_mutex);
m_output_cond.wait(output_lock, 30);
lock.Enter();
}
if (!m_output_ready.empty())
ret |= VC_PICTURE;

0 comments on commit 656a69d

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