Skip to content

Commit

Permalink
Merge pull request #324 from brunom/master
Browse files Browse the repository at this point in the history
Fix GetMediaType result check in Analyzer Filter
Thanks for the fix, Bruno.
  • Loading branch information
mikecopperwhite committed Aug 30, 2018
2 parents 39da9fe + 47387c6 commit a418f27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/filters/analyzer/analyzer.cpp
Expand Up @@ -101,7 +101,7 @@ HRESULT CAnalyzer::AnalyzeSample(IMediaSample *pSample)

AM_MEDIA_TYPE* pMediaType;
hr = pSample->GetMediaType(&pMediaType);
if (SUCCEEDED(hr))
if (hr == S_OK) // GetMediaType returns S_FALSE when the media type has not changed from the previous sample.
{
entry.IsMediaTypeChange = VARIANT_TRUE;
DeleteMediaType(pMediaType);
Expand Down

0 comments on commit a418f27

Please sign in to comment.