--- a/mmdevicefw/mdf/src/audio/mdasoundadapter/mdasoundadapterbody.cpp Fri Oct 08 19:45:45 2010 +0100
+++ b/mmdevicefw/mdf/src/audio/mdasoundadapter/mdasoundadapterbody.cpp Wed Oct 13 12:08:48 2010 +0100
@@ -182,10 +182,18 @@
// work out mask so that x&iRequestMinMask is equiv to x/iRequestMinSize*iRequestMinSize
iRequestMinMask = ~(iRequestMinSize-1); // assume iRequestMinSize is power of 2
iSavedTrailingData.Close();
- iSavedTrailingData.Create(iRequestMinSize);
+
+ err = iSavedTrailingData.Create(iRequestMinSize);
- iState = EStopped;
- iBytesPlayed = 0;
+ if (err != KErrNone)
+ {
+ Close();
+ }
+ else
+ {
+ iState = EStopped;
+ iBytesPlayed = 0;
+ }
}
return err;