Skip to content

Commit

Permalink
[omx] Avoid hang following jpegs that failed to decode
Browse files Browse the repository at this point in the history
There's a few instanced of xbmc hanging following a jpeg that failed to decode on GPU:
http://forum.stmlabs.com/showthread.php?tid=14839
raspberrypi/firmware#288
http://openelec.tv/forum/120-news-announcements/70709-openelec-4-0-released?start=15#105219

It should fail and continue with software decode. It hangs on the OMX_FreeBuffer call.
Looks like image_decode component should be returned to idle state before freeing buffers
  • Loading branch information
popcornmix committed Jul 1, 2014
1 parent 1fd6de0 commit 1ba3f8b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xbmc/cores/omxplayer/OMXImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,7 @@ void COMXImageDec::Close()

if(m_omx_decoder.IsInitialized())
{
m_omx_decoder.SetStateForComponent(OMX_StateIdle);
m_omx_decoder.FlushInput();
m_omx_decoder.FreeInputBuffers();
}
Expand Down Expand Up @@ -1433,6 +1434,7 @@ void COMXImageReEnc::Close()

if(m_omx_decoder.IsInitialized())
{
m_omx_decoder.SetStateForComponent(OMX_StateIdle);
m_omx_decoder.FlushInput();
m_omx_decoder.FreeInputBuffers();
}
Expand Down Expand Up @@ -1888,6 +1890,7 @@ void COMXTexture::Close()

if(m_omx_decoder.IsInitialized())
{
m_omx_decoder.SetStateForComponent(OMX_StateIdle);
m_omx_decoder.FlushInput();
m_omx_decoder.FreeInputBuffers();
}
Expand Down

0 comments on commit 1ba3f8b

Please sign in to comment.