Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
koying committed Oct 28, 2016
1 parent a95ca65 commit 985ce8b
Showing 1 changed file with 4 additions and 10 deletions.
Expand Up @@ -702,6 +702,7 @@ int CDVDVideoCodecAndroidMediaCodec::Decode(uint8_t *pData, int iSize, double dt
else if (m_state == MEDIACODEC_STATE_ENDOFSTREAM)
{
// VideoPlayer sends unasked buffer when going out of drain. Flush...
FlushInternal();
m_codec->flush();
m_state = MEDIACODEC_STATE_FLUSHED;
s_rtn |= VC_BUFFER;
Expand Down Expand Up @@ -862,13 +863,9 @@ void CDVDVideoCodecAndroidMediaCodec::Reset()
FlushInternal();

// now we can flush the actual MediaCodec object
if (m_state == MEDIACODEC_STATE_RUNNING)
{
m_codec->flush();
m_state = MEDIACODEC_STATE_FLUSHED;
}
else
CLog::Log(LOGERROR, "CDVDVideoCodecAndroidMediaCodec::Reset Wrong state (%d)", m_state);
CLog::Log(LOGDEBUG, "CDVDVideoCodecAndroidMediaCodec::Reset Current state (%d)", m_state);
m_codec->flush();
m_state = MEDIACODEC_STATE_FLUSHED;
if (xbmc_jnienv()->ExceptionCheck())
{
CLog::Log(LOGERROR, "CDVDVideoCodecAndroidMediaCodec::Reset ExceptionCheck");
Expand All @@ -880,8 +877,6 @@ void CDVDVideoCodecAndroidMediaCodec::Reset()
if (!m_render_sw)
m_videobuffer.mediacodec = NULL;
}
m_drop = false;
m_codecControlFlags = 0;
}

bool CDVDVideoCodecAndroidMediaCodec::GetPicture(DVDVideoPicture* pDvdVideoPicture)
Expand Down Expand Up @@ -968,7 +963,6 @@ void CDVDVideoCodecAndroidMediaCodec::FlushInternal()
m_inflight[i]->Release();
}
m_inflight.clear();

}

bool CDVDVideoCodecAndroidMediaCodec::ConfigureMediaCodec(void)
Expand Down

0 comments on commit 985ce8b

Please sign in to comment.