diff options
author | Liong Sauw Ming <ming@teluu.com> | 2011-10-06 07:11:15 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2011-10-06 07:11:15 +0000 |
commit | 401e79f3431f11d473c925e61ed013bfa57429b2 (patch) | |
tree | 2465bce73099d92ccc3fff82fd41e647c8d88db7 /pjmedia | |
parent | 790e06757b92282d3f6436a46f278f5c2b92139b (diff) |
Re #1370: Fixed dshow enumeration device capability.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3797 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r-- | pjmedia/src/pjmedia-videodev/dshow_dev.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pjmedia/src/pjmedia-videodev/dshow_dev.c b/pjmedia/src/pjmedia-videodev/dshow_dev.c index 0b1d2da1..4bfade82 100644 --- a/pjmedia/src/pjmedia-videodev/dshow_dev.c +++ b/pjmedia/src/pjmedia-videodev/dshow_dev.c @@ -257,7 +257,7 @@ static HRESULT get_cap_device(struct dshow_factory *df, static void enum_dev_cap(IBaseFilter *filter, pjmedia_dir dir, - const GUID *dshow_format, + const GUID *dshow_fmt, AM_MEDIA_TYPE **pMediatype, IPin **pSrcpin, pj_bool_t *sup_fmt) @@ -305,10 +305,12 @@ static void enum_dev_cap(IBaseFilter *filter, if (FAILED (hr)) continue; - nformat = (dshow_format? 1: + nformat = (dshow_fmt? 1: sizeof(dshow_fmts)/sizeof(dshow_fmts[0])); for (j = 0; j < nformat; j++) { - if (!dshow_format || j > 0) + const GUID *dshow_format = dshow_fmt; + + if (!dshow_format) dshow_format = dshow_fmts[j].dshow_format; if (UuidCompare(&mediatype->subtype, (UUID*)dshow_format, |