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

omxil: Set the WMV type

This isn't necessary on Galaxy S3 for VC1 (since WMV3/VC1 is the
default type), but might be necessary for WMV1/2 (untested yet).
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 298913cc
...@@ -431,6 +431,27 @@ static OMX_ERRORTYPE SetPortDefinition(decoder_t *p_dec, OmxPort *p_port, ...@@ -431,6 +431,27 @@ static OMX_ERRORTYPE SetPortDefinition(decoder_t *p_dec, OmxPort *p_port,
def->nBufferSize *= 2; def->nBufferSize *= 2;
} }
if (def->format.video.eCompressionFormat == OMX_VIDEO_CodingWMV) {
OMX_VIDEO_PARAM_WMVTYPE wmvtype = { 0 };
OMX_INIT_STRUCTURE(wmvtype);
wmvtype.nPortIndex = def->nPortIndex;
switch (p_dec->fmt_in.i_codec) {
case VLC_CODEC_WMV1:
wmvtype.eFormat = OMX_VIDEO_WMVFormat7;
break;
case VLC_CODEC_WMV2:
wmvtype.eFormat = OMX_VIDEO_WMVFormat8;
break;
case VLC_CODEC_WMV3:
case VLC_CODEC_VC1:
wmvtype.eFormat = OMX_VIDEO_WMVFormat9;
break;
}
omx_error = OMX_SetParameter(p_port->omx_handle, OMX_IndexParamVideoWmv, &wmvtype);
CHECK_ERROR(omx_error, "OMX_SetParameter OMX_IndexParamVideoWmv failed (%x : %s)",
omx_error, ErrorToString(omx_error));
}
error: error:
return omx_error; return omx_error;
} }
......
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