Commit 1b37b0ce authored by Rafaël Carré's avatar 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
(cherry picked from commit bb7509af)
Signed-off-by: default avatarRafaël Carré <funman@videolan.org>
parent d6182ce2
......@@ -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 ) )
{
......
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment