Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
- STDAPI AVIStreamInfoA (PAVISTREAM pavi, LPAVISTREAMINFOA psi,
- LONG lSize);
- #define AVIStreamInfo AVIStreamInfoA
- VDPosition AVIReadTunnelStream::TimeToPosition(VDTime timeInUs) {
- AVISTREAMINFO asi;
- if (AVIStreamInfo(pas, &asi, sizeof asi))
- return 0;
- return VDRoundToInt64(timeInUs * (double)asi.dwRate /
- (double)asi.dwScale * (1.0 / 1000000.0));
- }
- This suspicious code was found in Virtualdub project by PVS-Studio static code analyzer.
- Warning message is:
- V545 Such conditional expression of 'if' operator is incorrect for the HRESULT type value 'AVIStreamInfoA(pas, & asi, sizeof asi)'. The SUCCEEDED or FAILED macro should be used instead. VirtualDub avireadhandlertunnelw32.cpp 230
- 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