vlc | branch: master | Rafaël Carré <[email protected]> | Fri Feb 3 13:59:06 2012 -0500| [bb7509af051d8384b9266bcdb345c553f608559c] | committer: Rafaël Carré
bdagraph: build with mingw-w64 use _snwprintf instead of unsafe wsprintfW define NO_DSHOW_STRSAFE to not ask for secure replacements remove now meaningless very old mingw.org workarounds > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb7509af051d8384b9266bcdb345c553f608559c --- modules/access/dtv/bdagraph.cpp | 4 +++- modules/access/dtv/bdagraph.hpp | 31 +++++++++---------------------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/modules/access/dtv/bdagraph.cpp b/modules/access/dtv/bdagraph.cpp index 23f6818..5ef3ac5 100644 --- a/modules/access/dtv/bdagraph.cpp +++ b/modules/access/dtv/bdagraph.cpp @@ -2041,8 +2041,10 @@ HRESULT BDAGraph::Register() return hr; } - wsprintfW( psz_w_graph_name, L"VLC BDA Graph %08x Pid %08x", + size_t len = sizeof(psz_w_graph_name) / sizeof(psz_w_graph_name[0]); + _snwprintf( psz_w_graph_name, len - 1, L"VLC BDA Graph %08x Pid %08x", (DWORD_PTR) p_filter_graph, ::GetCurrentProcessId() ); + psz_w_graph_name[len-1] = 0; hr = CreateItemMoniker( L"!", psz_w_graph_name, &l.p_moniker ); if( FAILED( hr ) ) { diff --git a/modules/access/dtv/bdagraph.hpp b/modules/access/dtv/bdagraph.hpp index 40d429b..0ac989c 100644 --- a/modules/access/dtv/bdagraph.hpp +++ b/modules/access/dtv/bdagraph.hpp @@ -25,30 +25,17 @@ *****************************************************************************/ using namespace std; -#ifndef _MSC_VER -# include <wtypes.h> -# include <unknwn.h> -# include <ole2.h> -# include <limits.h> -# ifdef _WINGDI_ -# undef _WINGDI_ -# endif -# define _WINGDI_ 1 -# define AM_NOVTABLE -# define _OBJBASE_H_ -# undef _X86_ -# ifndef _I64_MAX -# define _I64_MAX 0x7FFFFFFFFFFFFFFFLL -# endif -# define LONGLONG long long -/* Work-around a bug in w32api-2.5 */ -/* # define QACONTAINERFLAGS QACONTAINERFLAGS_SOMETHINGELSE */ -#endif - -/* Needed to call CoInitializeEx */ -#define _WIN32_DCOM +#include <wtypes.h> +#include <unknwn.h> +#include <ole2.h> +#include <limits.h> + +/* FIXME: mingw.org doesn't define secure versions of + * http://msdn.microsoft.com/en-us/library/f30dzcf6.aspxu */ +#define NO_DSHOW_STRSAFE #include <dshow.h> + #include <comcat.h> #include "dtv/bdadefs.h" _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
