cplussharp / graph-studio-next

GraphStudioNext is a tool for developers to build and test DirectShow Graphs
355 stars 94 forks source link

Wrong initialization of Analyzer filter in CAnalyzerPage due to a typo #289

Closed MarkusHeiling closed 7 years ago

MarkusHeiling commented 8 years ago

There is a typo in "CAnalyzerPage::OnApplyChanges" which is using a wrong define to initialize the capture configuration of the analyzer filter. This may lead to that the analyzer filter does not capture any samples if the capture options are changed with the checkboxes of that dialog.

HRESULT CAnalyzerPage::OnApplyChanges()
{
    UpdateData();
    filter->put_Enabled(IsDlgButtonChecked(IDC_ANALYZER_ENABLED) ? VARIANT_TRUE : VARIANT_FALSE);
    ASSERT(m_nPreviewByteCount <= 0xFFFF);
    filter->put_PreviewSampleByteCount((unsigned short) m_nPreviewByteCount);

    int captureConfig = SCF_ALL; // <-- Should be "SCF_All" (lowercase "l" characters)

Please note the "SCF_ALL" define (uppercase "L" characters), it does not map to the supposed define "SCF_All" (lowercase "L" characters) from "StatisticCaptureFlags".

Another small typo is in "CAnalyzerPage::GetEntryString()".

case SRK_BF_Run: val = _T("IBaseFilter:Run:"); break; should read as case SRK_BF_Run: val = _T("IBaseFilter::Run"); break;

Kind regards