OSDN Git Service

Fix valgrind error
authorMarco Nelissen <marcone@google.com>
Tue, 19 Mar 2013 16:57:29 +0000 (09:57 -0700)
committerMarco Nelissen <marcone@google.com>
Tue, 19 Mar 2013 16:57:29 +0000 (09:57 -0700)
The volume member of the BundledEffectContext class was not being
initialized, resulting in uninitialized data being used for calculations
and control flow.

Change-Id: I84bf9fd478e5d0479e781323b21c7c03dea958c5

media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp

index 94b9acf..54f8d9e 100644 (file)
@@ -224,6 +224,7 @@ extern "C" int EffectCreate(const effect_uuid_t *uuid,
         pContext->pBundledContext->NumberEffectsEnabled     = 0;
         pContext->pBundledContext->NumberEffectsCalled      = 0;
         pContext->pBundledContext->firstVolume              = LVM_TRUE;
+        pContext->pBundledContext->volume                   = 0;
 
         #ifdef LVM_PCM
         char fileName[256];