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

omxil: Avoid a SetParameters call that fails for audio codecs on Galaxy S II

This SetParameters call shouldn't be necessary as far as I know,
but only avoiding it for audio codecs for now.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit 32f03862749167b62c05c0b228911ab4e2ae1d5f)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent bae66af5
......@@ -1062,10 +1062,25 @@ static OMX_ERRORTYPE PortReconfigure(decoder_t *p_dec, OmxPort *p_port)
/* Get the new port definition */
omx_error = GetPortDefinition(p_dec, &p_sys->out, p_sys->out.p_fmt);
if(omx_error != OMX_ErrorNone) goto error;
omx_error = OMX_SetParameter(p_dec->p_sys->omx_handle, OMX_IndexParamPortDefinition,
&definition);
CHECK_ERROR(omx_error, "OMX_SetParameter failed (%x : %s)",
omx_error, ErrorToString(omx_error));
if( p_dec->fmt_in.i_cat != AUDIO_ES )
{
/* Don't explicitly set the new parameters that we got with
* OMX_GetParameter above when using audio codecs.
* That struct hasn't been changed since, so there should be
* no need to set it here, unless some codec expects the
* SetParameter call as a trigger event for some part of
* the reconfiguration.
* This fixes using audio decoders on Samsung Galaxy S II,
*
* Only skipping this for audio codecs, to minimize the
* change for current working configurations for video.
*/
omx_error = OMX_SetParameter(p_dec->p_sys->omx_handle, OMX_IndexParamPortDefinition,
&definition);
CHECK_ERROR(omx_error, "OMX_SetParameter failed (%x : %s)",
omx_error, ErrorToString(omx_error));
}
omx_error = OMX_SendCommand( p_sys->omx_handle, OMX_CommandPortEnable,
p_port->i_port_index, NULL);
......
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