summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-08-17 09:49:06 +0000
committerBenny Prijono <bennylp@teluu.com>2007-08-17 09:49:06 +0000
commit536bcf4b3dde60c5c9c658f18fb3804c0d824073 (patch)
tree7f4a7664f5d349c66dcb8d0de92a8d04fc2df271 /pjmedia
parentc11ccc740f57ff51b243371463d44ccc689f46af (diff)
Fixed bug in dsound.c: device GUID refered to local variable
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1421 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/src/pjmedia/dsound.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pjmedia/src/pjmedia/dsound.c b/pjmedia/src/pjmedia/dsound.c
index 511776af..3f71edc7 100644
--- a/pjmedia/src/pjmedia/dsound.c
+++ b/pjmedia/src/pjmedia/dsound.c
@@ -51,7 +51,7 @@
struct dsound_dev_info
{
pjmedia_snd_dev_info info;
- LPGUID lpGuid;
+ GUID guid;
};
static unsigned dev_count;
@@ -158,7 +158,7 @@ static pj_status_t init_player_stream( struct dsound_stream *ds_strm,
/*
* Create DirectSound device.
*/
- hr = DirectSoundCreate(dev_info[dev_id].lpGuid, &ds_strm->ds.play.lpDs,
+ hr = DirectSoundCreate(&dev_info[dev_id].guid, &ds_strm->ds.play.lpDs,
NULL);
if (FAILED(hr))
return PJ_RETURN_OS_ERROR(hr);
@@ -277,7 +277,7 @@ static pj_status_t init_capture_stream( struct dsound_stream *ds_strm,
/*
* Creating recorder device.
*/
- hr = DirectSoundCaptureCreate(dev_info[dev_id].lpGuid,
+ hr = DirectSoundCaptureCreate(&dev_info[dev_id].guid,
&ds_strm->ds.capture.lpDs, NULL);
if (FAILED(hr))
return PJ_RETURN_OS_ERROR(hr);
@@ -601,7 +601,7 @@ static BOOL CALLBACK DSEnumCallback( LPGUID lpGuid, LPCSTR lpcstrDescription,
* dev_info item, by looking at the GUID.
*/
for (index=0; index<dev_count; ++index) {
- if (dev_info[index].lpGuid == lpGuid)
+ if (pj_memcmp(&dev_info[index].guid, lpGuid, sizeof(GUID))==0)
break;
}
@@ -616,7 +616,7 @@ static BOOL CALLBACK DSEnumCallback( LPGUID lpGuid, LPCSTR lpcstrDescription,
strncpy(dev_info[index].info.name, lpcstrDescription, max);
dev_info[index].info.name[max-1] = '\0';
- dev_info[index].lpGuid = lpGuid;
+ pj_memcpy(&dev_info[index].guid, lpGuid, sizeof(GUID));
dev_info[index].info.default_samples_per_sec = 44100;
/* Just assumed that device supports stereo capture/playback */