diff options
author | YuanQY <yuanqingyun@gmail.com> | 2013-02-22 19:23:14 +0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-02-27 21:26:37 -0800 |
commit | 9a814ad626233ff02dd2d393929f32225bc94b68 (patch) | |
tree | 4a41e05a764ffae1bcd03c9265c772fae2f4b9ee | |
parent | 9be07ef6a1d4dc591a25b3364a6ca0ad6f524ab9 (diff) | |
download | frameworks_av-9a814ad626233ff02dd2d393929f32225bc94b68.zip frameworks_av-9a814ad626233ff02dd2d393929f32225bc94b68.tar.gz frameworks_av-9a814ad626233ff02dd2d393929f32225bc94b68.tar.bz2 |
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
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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, |