Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- STDMETHODIMP TmyWriterSink::OnHeader(INSSBuffer *pHeader)
- {
- if (!f) f=fopen("c:\\2.wmv","wb");
- BYTE *buf; DWORD len;
- pHeader->GetBufferAndLength(&buf,&len);
- fwrite(buf,1,len,f);
- return S_OK;
- }
- Even if this was written just for the purpose of debugging, you'd better not do it that way. Other programmers may have troubles working with it.
- This suspicious code was found in ffdshow project by PVS-Studio static code analyzer.
- Warning message is:
- V631 Consider inspecting the 'fopen' function call. Defining an absolute path to the file or directory is considered a poor style. writersink.cpp 13
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment