libstagefright: fix indefinate loop in QueryCodec

portFormat.nIndex is being incremented which is not
trustworthy since the nIndex value could be overriden
by the OMX Component,  which causes an indefinate loop
which inturn causes a memory leak and crashes the system.

OMX Component on encore and p970 exhibits this behaviour
(OMX.TI.720P.Decoder). This patch prevents stagefright
freezes when QueryCodec is called during Gallery Thumbnail
generation for videos and Adobe Flash playback.

Change-Id: I825c99ddecacbb927e22ac7d1a53facb26d95ff2
libstagefright: Fix a video lag bug after audio reached EOS.

http://git.insignal.co.kr/samsung/exynos/android/platform/frameworks/av/commit/?h=exynos-jb&id=da4104e5f934633b4ba7fda06bc9ef3ba0f85a31

Change-Id: I14931cad92df48e1233c5a8a704bb18585b1795a
Merge remote-tracking branch 'cyanogen/cm-10.1' into cm-10.1
Revert "Revert "libstagefright: Fix incorrectness nPortIndex value for QueryCodec""

This reverts commit 43b58a4fa272983db7ca22ebf592305429b1bba0.
camera: add more htc parameters

Google Edition

Change-Id: I67968ea749dec0bf3810110f99bccdd3edee3428
Merge remote-tracking branch 'cyanogen/cm-10.1' into cm-10.1
Camera: Add more htc parameters

Change-Id: Ica43a42f6ec6e25671b22536c768140469fb9824
audioflinger: remove redundand ifdef

Change-Id: Iefc64cf477fd58a29984a9c198d84e876dbcf1c5
libstagefright: [Reworked] Fix incorrectness nPortIndex value for QueryCodec

http://review.cyanogenmod.org/#/c/32358/ was intended to fix
issues with OMX Components failing on ME722 (OMAP3).
This patch was working fine on OMAP3 devices and was required
to fix issues DSP MMU FAULTS. It has been reverted with patch
http://review.cyanogenmod.org/44486 which again broke OMX on
OMAP3.

Implement a Workaround for OMAP using OMAP_ENHANCEMENT

Log for this issue observed on P970 (OMAP3) during Gallery
Thumbnail Generation: http://pastebin.com/qRTpm7RN

DmmMap():1600 DSPProcessor_ReserveMemory() failed - error 0xfffffffb

Change-Id: Ifd0c784e354c6c00401686cc0f2188842df9496c
Fix includes for media-caf

Change-Id: I5d6dedbb9ba03fc313ab27f91bf83376fa20a7a9
Merge "Camera: Add more htc parameters" into cm-10.1
Merge remote-tracking branch 'cyanogen/cm-10.1' into cm-10.1

Conflicts:
	media/libstagefright/OMXCodec.cpp
Merge remote-tracking branch 'cm-10.1-mb52x/cm-10.1' into cm-10.1-mb52x