From d246521320930eb12c0083a6f572111b6e908868 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 13 Aug 2015 17:37:40 +0200 Subject: [PATCH] Bug 1193864 - Fixed dom/media/platforms/wmf/ compilation on mingw. r=cpearce --- dom/media/platforms/wmf/MFTDecoder.cpp | 4 ---- dom/media/platforms/wmf/WMFDecoderModule.cpp | 6 +++--- dom/media/platforms/wmf/WMFMediaDataDecoder.cpp | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dom/media/platforms/wmf/MFTDecoder.cpp b/dom/media/platforms/wmf/MFTDecoder.cpp index 7a433fd7d3ae..94ba6dd2e7cb 100644 --- a/dom/media/platforms/wmf/MFTDecoder.cpp +++ b/dom/media/platforms/wmf/MFTDecoder.cpp @@ -180,10 +180,6 @@ MFTDecoder::CreateOutputSample(RefPtr* aOutSample) hr = wmf::MFCreateAlignedMemoryBuffer(bufferSize, alignment, byRef(buffer)); NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - DWORD maxLength = 0; - DWORD currentLength = 0; - BYTE* dst = nullptr; - hr = sample->AddBuffer(buffer); NS_ENSURE_TRUE(SUCCEEDED(hr), hr); diff --git a/dom/media/platforms/wmf/WMFDecoderModule.cpp b/dom/media/platforms/wmf/WMFDecoderModule.cpp index f0756322b9b6..d6e76225ce5d 100644 --- a/dom/media/platforms/wmf/WMFDecoderModule.cpp +++ b/dom/media/platforms/wmf/WMFDecoderModule.cpp @@ -98,11 +98,11 @@ WMFDecoderModule::CreateVideoDecoder(const VideoInfo& aConfig, FlushableTaskQueue* aVideoTaskQueue, MediaDataDecoderCallback* aCallback) { - nsAutoPtr manager = + nsAutoPtr manager( new WMFVideoMFTManager(aConfig, aLayersBackend, aImageContainer, - sDXVAEnabled && ShouldUseDXVA(aConfig)); + sDXVAEnabled && ShouldUseDXVA(aConfig))); nsRefPtr mft = manager->Init(); @@ -121,7 +121,7 @@ WMFDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig, FlushableTaskQueue* aAudioTaskQueue, MediaDataDecoderCallback* aCallback) { - nsAutoPtr manager = new WMFAudioMFTManager(aConfig); + nsAutoPtr manager(new WMFAudioMFTManager(aConfig)); nsRefPtr mft = manager->Init(); if (!mft) { diff --git a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp index f456f64a2260..5b07e07a5d2c 100644 --- a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp +++ b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp @@ -48,7 +48,7 @@ WMFMediaDataDecoder::Init() // A single telemetry sample is reported for each MediaDataDecoder object // that has detected error or produced output successfully. static void -SendTelemetry(HRESULT hr) +SendTelemetry(unsigned long hr) { // Collapse the error codes into a range of 0-0xff that can be viewed in // telemetry histograms. For most MF_E_* errors, unique samples are used,