Bug 1288618 - Part 4: Fix some namespace collisions in media code. r?cpearce draft
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 15 Sep 2016 13:10:56 +1200
changeset 413857 122db3954775f46cc4f2dff0e82833a59be0fd62
parent 413856 b75ceb2470afa2675dafea59fd4b8b7df037b8cd
child 413858 01fa9e87b6d738a4a07507063982d26f8c350c3b
push id29543
push usermwoodrow@mozilla.com
push dateThu, 15 Sep 2016 02:36:28 +0000
reviewerscpearce
bugs1288618
milestone51.0a1
Bug 1288618 - Part 4: Fix some namespace collisions in media code. r?cpearce MozReview-Commit-ID: DIoAY93fTG4
dom/media/mediasource/SourceBuffer.cpp
--- a/dom/media/mediasource/SourceBuffer.cpp
+++ b/dom/media/mediasource/SourceBuffer.cpp
@@ -18,16 +18,22 @@
 #include "nsError.h"
 #include "nsIEventTarget.h"
 #include "nsIRunnable.h"
 #include "nsThreadUtils.h"
 #include "mozilla/Logging.h"
 #include <time.h>
 #include "TimeUnits.h"
 
+// GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
+// GetTickCount() and conflicts with MediaDecoder::GetCurrentTime implementation.
+#ifdef GetCurrentTime
+#undef GetCurrentTime
+#endif
+
 struct JSContext;
 class JSObject;
 
 extern mozilla::LogModule* GetMediaSourceLog();
 extern mozilla::LogModule* GetMediaSourceAPILog();
 
 #define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
 #define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Verbose, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))