From 9a814ad626233ff02dd2d393929f32225bc94b68 Mon Sep 17 00:00:00 2001 From: YuanQY Date: Fri, 22 Feb 2013 19:23:14 +0800 Subject: libstagefright: Fix incorrectness nPortIndex value for QueryCodec The query index is wrong, it will make a death loop in my ME722 when get resource thumbnail for MPEG4 video. Change-Id: I64532156e762b847a8eae59560fb828549c29519 --- media/libstagefright/OMXCodec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 02993d0..c149379 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -5330,7 +5330,7 @@ status_t QueryCodec( // Color format query OMX_VIDEO_PARAM_PORTFORMATTYPE portFormat; InitOMXParams(&portFormat); - portFormat.nPortIndex = !isEncoder ? 1 : 0; + portFormat.nPortIndex = !isEncoder ? 0 : 1; for (portFormat.nIndex = 0;; ++portFormat.nIndex) { err = omx->getParameter( node, OMX_IndexParamVideoPortFormat, -- cgit v1.1