mmlibs/mmfw/src/server/BaseClasses/mmfdatapath.cpp
changeset 5 b220a9341636
parent 0 b8ed18f6c07b
--- a/mmlibs/mmfw/src/server/BaseClasses/mmfdatapath.cpp	Mon Oct 18 12:47:26 2010 +0100
+++ b/mmlibs/mmfw/src/server/BaseClasses/mmfdatapath.cpp	Tue Nov 02 12:13:59 2010 +0000
@@ -217,11 +217,20 @@
 	//CreateSourceBufferL and CreateSinkBufferL we will need to obtain them by 
 	//asynchronous buffer creation when playing starts.
 
+	TInt err = KErrNone;
 	if (iBuffersToUse & ENeedSourceBuffer)
 		{
 		if (!iSourceBuffer) //we may already have a buffer from a previous initialization
 			{
-			TRAPD(err, iSourceBuffer = iDataSource->CreateSourceBufferL(iMediaId,*iSinkBuffer, iSrcBufRef));
+	        if(iSinkBuffer)
+	            {
+	            TRAP(err, iSourceBuffer = iDataSource->CreateSourceBufferL(iMediaId,*iSinkBuffer, iSrcBufRef));
+	            }
+	        else
+	            {
+	            TRAP(err, iSourceBuffer = iDataSource->CreateSourceBufferL(iMediaId,iSrcBufRef));
+	            }
+	      
 			if(err != KErrNone && err != KErrNotSupported)
 				{
 #ifdef _DP_DEBUG