media/libeffects/downmix/Android.mk: GCC 4.8 fix - use '-fno-strict-aliasing' in local cflags
media/libeffects/loudness/Android.mk: GCC 4.8 fix - add '-fno-strict-alising' to local cflags
media/libeffects/visualizer/Android.mk: GCC 4.8 fix - use '-fno-strict-aliasing' in local cflags
media/media/libmedia/Android.mk: GCC 4.8 fix - use '-fno-strict-aliasing' in local cflags
services/audioflinger/Android.mk: GCC 4.8 fix - use '-fno-strict-aliasing' in local cflags
services/camera/libcameraservice/Android.mk: GCC 4.8 fix - use '-fno-strict-aliasing' in local cflags
media/libmediaplayerservice/Android.mk: GCC 4.8 fix - use '-fno-strict-aliasing' in local cflags
media/libstagefright/Android.mk: GCC 4.8 fix - use '-fno-strict-aliasing' in local cflags
media: memset sizeof argument issues

Change-Id: I37ef154eea0f77fb7f22faf6891f3025f6ff346e
media: unused argument warning messages

Do NOT MERGE, fails downstream due to conflicts

Change-Id: I031c4fed61fbe795c25817615781081783b04158
media: unused argument warning messages

SideEffects: NONE

Change-Id: I0f7b7643810393040483f25fe4514a10cd07cbe8

Conflicts:
	media/libeffects/preprocessing/PreProcessing.cpp
	media/libstagefright/FLACExtractor.cpp
media: -Werror re-enabled

Change-Id: I62fdb78e8acefafd468ce2e5aa9e78eba0dd0f48

Conflicts:
	media/libstagefright/timedtext/Android.mk
Fix memory leak when filtering commands in insertCommand_l()

When AudioPolicyService::AudioCommandThread::insertCommand_l filters
a command from the queue, the AudioCommand* is removed from the
vector mAudioCommands by calling mAudioCommands.removeAt(). This will
destroy the pointer and compact the vector, but not delete the
AudioCommand object.

This patch adds code to delete a filtered out AudioCommand and its
data object mParam. However, mParam was void* and deleting a void
pointer is undefined behavior according to the C++
standard. Therefore, the data classes are modified to inherit
from an abstract base class with a virtual destructor.

The deletion of non-filtered commands in
AudioPolicyService::AudioCommandThread::threadLoop() was already
correct, as each case casts mParam to the proper type before
deleting.

This also fixes AOSP issue 36370.

Change-Id: I2b63838aff3608132aa496f964a929f78c4b6267
Fix inline assembly for clang

add r8, r0, asl #2
and
add r8, r8, r0, asl #2

are identical in gcc inline assembly, but clang accepts only the latter
variant.

Change-Id: I922367984b6ae2f7268ce99facaf8da425c39d7e
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Define missing static const variable

This prevents link errors with clang (and probably also
with gcc -O0).

Change-Id: Idab65248b45609846c52f5b7aa84fc8701d79237
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Make sure DISALLOW_EVIL_CONSTRUCTORS etc. are defined when used

Without this patch, clang complains about DISALLOW_EVIL_CONSTRUCTORS
being undefined in MediaMuxer.h and MediaWriter.h and
DISALLOW_IMPLICIT_CONSTRUCTORS being undefined in SurfaceMediaSource.h.

This may need some further analysis to see why gcc does see the
definitions - but this variant works with both compilers.

Change-Id: Ie4e99affe98ed8fb1bfcf5ec604c19dcd5311c62
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Movie studio: fix a memory leak issue in the AOSP code

It's an android defect, connect()/disconnect() of OMXClient need be called in a pair,
if miss calling disconnect() while connect() is called, a memory leak will happen.

Change-Id: I9acc19242faa5c981bb77caba52170e0f96dbf96
Orig-Change-Id: I0fa40422aa54dc97dadd850e8a4cb5a9697cb685
Signed-off-by: Gu, Wangyi <wangyi.gu@intel.com>
Signed-off-by: Dan Liang <dan.liang@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 80150
fix wrong access

canConnectUnsafe's output parameter changed from client to clientTmp.
But compare routine didn't changed and client.get() return NULL always.

Change-Id: I3c88391dbee10cc355b2dbf655989ff0d0963600
Fix strstr constness

Change-Id: I796276c7efc9ac59596d05fc7b8ce93c2c83ac19
libeffects: Add zero check for enabledMsk and revEnabledMsk

If upper level doesn't send command EFFECT_CMD_ENABLE,
then it'll still call functions PreProcessingFx_Process
and PreProcessingFx_ProcessReverse. These functions will
continue to work and process because either enableMsk
or revEnableMsk is 0.

The result of condition:
"session->processedMsk & session->enabledMsk" is "0".
And "0" will be equal to "session->enabledMsk". Then
expression value will be true.

Change-Id: I6b1f636d67b759b9f96d0ae3440611dd5b782e5c
Signed-off-by: Yuan Zhang <yuanz@marvell.com>