This commit is contained in:
av%netscape.com 1999-12-22 21:53:14 +00:00
Родитель 217c50bb3b
Коммит 8af17f66e2
4 изменённых файлов: 6 добавлений и 36 удалений

Просмотреть файл

@ -212,21 +212,6 @@ ns4xPluginStreamListener::OnDataAvailable(nsIPluginStreamInfo* pluginInfo,
#endif #endif
amountRead -= numtowrite; amountRead -= numtowrite;
mPosition += numtowrite; mPosition += numtowrite;
/**/
if(amountRead == 0)//~~~this is a temporary workaround to make RealAudio work
{
NPError error = CallNPP_DestroyStreamProc(callbacks->destroystream, npp, &mNPStream, NPRES_DONE);
if(error != NPERR_NO_ERROR)
return NS_ERROR_FAILURE;
if(callbacks->urlnotify != NULL && mNotifyData != nsnull)
{
#if !TARGET_CARBON
CallNPP_URLNotifyProc(callbacks->urlnotify,npp,mNPStream.url,nsPluginReason_Done,mNotifyData);
#endif
}
}
} }
} }

Просмотреть файл

@ -898,10 +898,10 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnStopRequest(nsIChannel* channel,
nsCRT::free(urlString); nsCRT::free(urlString);
// tell the plugin that the stream has ended only if the cache is done // tell the plugin that the stream has ended only if the cache is done
if(mCacheDone) // if(mCacheDone)
mPStreamListener->OnStopBinding((nsIPluginStreamInfo*)mPluginStreamInfo, aStatus); mPStreamListener->OnStopBinding((nsIPluginStreamInfo*)mPluginStreamInfo, aStatus);
else // otherwise, we store the status so we can report it later in OnFileAvailable // else // otherwise, we store the status so we can report it later in OnFileAvailable
mStatus = aStatus; // mStatus = aStatus;
} }
mOnStopRequest = PR_TRUE; mOnStopRequest = PR_TRUE;

Просмотреть файл

@ -212,21 +212,6 @@ ns4xPluginStreamListener::OnDataAvailable(nsIPluginStreamInfo* pluginInfo,
#endif #endif
amountRead -= numtowrite; amountRead -= numtowrite;
mPosition += numtowrite; mPosition += numtowrite;
/**/
if(amountRead == 0)//~~~this is a temporary workaround to make RealAudio work
{
NPError error = CallNPP_DestroyStreamProc(callbacks->destroystream, npp, &mNPStream, NPRES_DONE);
if(error != NPERR_NO_ERROR)
return NS_ERROR_FAILURE;
if(callbacks->urlnotify != NULL && mNotifyData != nsnull)
{
#if !TARGET_CARBON
CallNPP_URLNotifyProc(callbacks->urlnotify,npp,mNPStream.url,nsPluginReason_Done,mNotifyData);
#endif
}
}
} }
} }

Просмотреть файл

@ -898,10 +898,10 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnStopRequest(nsIChannel* channel,
nsCRT::free(urlString); nsCRT::free(urlString);
// tell the plugin that the stream has ended only if the cache is done // tell the plugin that the stream has ended only if the cache is done
if(mCacheDone) // if(mCacheDone)
mPStreamListener->OnStopBinding((nsIPluginStreamInfo*)mPluginStreamInfo, aStatus); mPStreamListener->OnStopBinding((nsIPluginStreamInfo*)mPluginStreamInfo, aStatus);
else // otherwise, we store the status so we can report it later in OnFileAvailable // else // otherwise, we store the status so we can report it later in OnFileAvailable
mStatus = aStatus; // mStatus = aStatus;
} }
mOnStopRequest = PR_TRUE; mOnStopRequest = PR_TRUE;