extern IMediaSample *pSave = NULL;
This is not just an announcement. This will determine pSaveup to NULL. Since both .cppinclude .h, this variable will be defined in 2 translation units, which causes a conflict.
You should just rewrite it as
extern IMediaSample *pSave;
in .h, then add IMediaSample *pSave = NULL;exactly to one of .cpps.
source
share