Commit f27586ef authored by Martin Storsjö's avatar Martin Storsjö Committed by Jean-Baptiste Kempf

omxil: Don't do a full reconfigure for all settings changed events

Only do it for the right events.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 0ce57ba0
......@@ -1630,12 +1630,19 @@ static OMX_ERRORTYPE OmxEventHandler( OMX_HANDLETYPE omx_handle,
case OMX_EventPortSettingsChanged:
msg_Dbg( p_dec, "OmxEventHandler (%s, %u, %u)", EventToString(event),
(unsigned int)data_1, (unsigned int)data_2 );
if( data_2 == 0 || data_2 == OMX_IndexParamPortDefinition )
{
for(i = 0; i < p_sys->ports; i++)
if(p_sys->p_ports[i].definition.eDir == OMX_DirOutput)
p_sys->p_ports[i].b_reconfigure = true;
memset(&p_sys->sentinel_buffer, 0, sizeof(p_sys->sentinel_buffer));
p_sys->sentinel_buffer.nFlags = OMX_BUFFERFLAG_EOS;
OMX_FIFO_PUT(&p_sys->in.fifo, &p_sys->sentinel_buffer);
}
else
{
msg_Dbg( p_dec, "Unhandled setting change %x", (unsigned int)data_2 );
}
break;
default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment