Skip to content

Commit

Permalink
FIX: [amc] Reset: unconditional flush + don't overwrite statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
koying committed Oct 29, 2016
1 parent ae15cb7 commit 6b1eb69
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -857,13 +857,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 @@ -875,8 +871,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

0 comments on commit 6b1eb69

Please sign in to comment.