Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-01-26 01:05:28 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2015-01-26 01:05:28 +0300
commit2616e6786d69f848b02156518a3b4798a149b215 (patch)
tree8444b48474596bde3ce5c31ec261d4a1dde0a9d6 /decoder
parentc9e348817ce1bf17a3dc6e00a77d112880d34d85 (diff)
Fix a bunch of x64 only warnings
Diffstat (limited to 'decoder')
-rw-r--r--decoder/LAVAudio/LAVAudio.cpp1
-rw-r--r--decoder/LAVVideo/decoders/cuvid.cpp4
-rw-r--r--decoder/LAVVideo/decoders/quicksync.cpp4
-rw-r--r--decoder/LAVVideo/decoders/wmv9mft.cpp14
-rw-r--r--decoder/LAVVideo/decoders/wmv9mft.h4
-rw-r--r--decoder/LAVVideo/parsers/VC1HeaderParser.cpp4
-rw-r--r--decoder/LAVVideo/subtitles/LAVSubtitleProvider.cpp2
7 files changed, 17 insertions, 16 deletions
diff --git a/decoder/LAVAudio/LAVAudio.cpp b/decoder/LAVAudio/LAVAudio.cpp
index 6018e5b2..e3009e8d 100644
--- a/decoder/LAVAudio/LAVAudio.cpp
+++ b/decoder/LAVAudio/LAVAudio.cpp
@@ -37,6 +37,7 @@
#pragma warning( push )
#pragma warning( disable : 4018 )
#pragma warning( disable : 4101 )
+#pragma warning( disable : 4244 )
extern "C" {
#define AVCODEC_X86_MATHOPS_H
#include "libavformat/spdif.h"
diff --git a/decoder/LAVVideo/decoders/cuvid.cpp b/decoder/LAVVideo/decoders/cuvid.cpp
index 759ead9f..f28e22a8 100644
--- a/decoder/LAVVideo/decoders/cuvid.cpp
+++ b/decoder/LAVVideo/decoders/cuvid.cpp
@@ -1115,11 +1115,11 @@ STDMETHODIMP CDecCuvid::Decode(const BYTE *buffer, int buflen, REFERENCE_TIME rt
// If we found a EOS marker, but its not at the end of the packet, then split the packet
// to be able to individually decode the frame before the EOS, and then decode the remainder
if (eosmarker && eosmarker != end) {
- Decode(buffer, (eosmarker - buffer), rtStart, rtStop, bSyncPoint, bDiscontinuity);
+ Decode(buffer, (int)(eosmarker - buffer), rtStart, rtStop, bSyncPoint, bDiscontinuity);
rtStart = rtStop = AV_NOPTS_VALUE;
pCuvidPacket.payload = eosmarker;
- pCuvidPacket.payload_size = end - eosmarker;
+ pCuvidPacket.payload_size = (int)(end - eosmarker);
} else if (eosmarker) {
m_bEndOfSequence = TRUE;
}
diff --git a/decoder/LAVVideo/decoders/quicksync.cpp b/decoder/LAVVideo/decoders/quicksync.cpp
index 14206440..f83935fb 100644
--- a/decoder/LAVVideo/decoders/quicksync.cpp
+++ b/decoder/LAVVideo/decoders/quicksync.cpp
@@ -537,11 +537,11 @@ STDMETHODIMP CDecQuickSync::Decode(const BYTE *buffer, int buflen, REFERENCE_TIM
// If we found a EOS marker, but its not at the end of the packet, then split the packet
// to be able to individually decode the frame before the EOS, and then decode the remainder
if (eosmarker && eosmarker != end) {
- Decode(buffer, (eosmarker - buffer), rtStart, rtStop, bSyncPoint, bDiscontinuity);
+ Decode(buffer, (int)(eosmarker - buffer), rtStart, rtStop, bSyncPoint, bDiscontinuity);
rtStart = rtStop = AV_NOPTS_VALUE;
buffer = eosmarker;
- buflen = end - eosmarker;
+ buflen = (int)(end - eosmarker);
} else if (eosmarker) {
m_bEndOfSequence = TRUE;
}
diff --git a/decoder/LAVVideo/decoders/wmv9mft.cpp b/decoder/LAVVideo/decoders/wmv9mft.cpp
index 9c368bef..f1ec27de 100644
--- a/decoder/LAVVideo/decoders/wmv9mft.cpp
+++ b/decoder/LAVVideo/decoders/wmv9mft.cpp
@@ -199,7 +199,7 @@ STDMETHODIMP CDecWMV9MFT::InitDecoder(AVCodecID codec, const CMediaType *pmt)
MF.AverageTimePerFrameToFrameRate(rtAvg, &rateNum, &rateDen);
MFSetAttributeRatio(pMTIn, MF_MT_FRAME_RATE, rateNum, rateDen);
- pMTIn->SetBlob(MF_MT_USER_DATA, extra, extralen);
+ pMTIn->SetBlob(MF_MT_USER_DATA, extra, (UINT32)extralen);
av_freep(&extra);
hr = m_pMFT->SetInputType(0, pMTIn, 0);
@@ -371,7 +371,7 @@ static inline void memcpy_plane(BYTE *dst, const BYTE *src, ptrdiff_t width, ptr
}
}
-IMFMediaBuffer * CDecWMV9MFT::GetBuffer(size_t sRequiredSize)
+IMFMediaBuffer * CDecWMV9MFT::GetBuffer(DWORD dwRequiredSize)
{
CAutoLock lock(&m_BufferCritSec);
HRESULT hr;
@@ -385,19 +385,19 @@ IMFMediaBuffer * CDecWMV9MFT::GetBuffer(size_t sRequiredSize)
}
if (buffer) {
// Validate Size
- if (buffer->size < sRequiredSize || !buffer->pBuffer) {
+ if (buffer->size < dwRequiredSize || !buffer->pBuffer) {
SafeRelease(&buffer->pBuffer);
- hr = MF.CreateAlignedMemoryBuffer(sRequiredSize, MF_32_BYTE_ALIGNMENT, &buffer->pBuffer);
+ hr = MF.CreateAlignedMemoryBuffer(dwRequiredSize, MF_32_BYTE_ALIGNMENT, &buffer->pBuffer);
if (FAILED(hr)) return nullptr;
- buffer->size = sRequiredSize;
+ buffer->size = dwRequiredSize;
}
} else {
// Create a new buffer
DbgLog((LOG_TRACE, 10, L"Allocating new buffer for WMV9 MFT"));
buffer = new Buffer();
- hr = MF.CreateAlignedMemoryBuffer(sRequiredSize, MF_32_BYTE_ALIGNMENT, &buffer->pBuffer);
+ hr = MF.CreateAlignedMemoryBuffer(dwRequiredSize, MF_32_BYTE_ALIGNMENT, &buffer->pBuffer);
if (FAILED(hr)) { delete buffer; return nullptr; }
- buffer->size = sRequiredSize;
+ buffer->size = dwRequiredSize;
m_BufferQueue.push_back(buffer);
}
buffer->used = 1;
diff --git a/decoder/LAVVideo/decoders/wmv9mft.h b/decoder/LAVVideo/decoders/wmv9mft.h
index 82aa2690..7a42a45e 100644
--- a/decoder/LAVVideo/decoders/wmv9mft.h
+++ b/decoder/LAVVideo/decoders/wmv9mft.h
@@ -47,7 +47,7 @@ class CVC1HeaderParser;
typedef struct _Buffer {
IMFMediaBuffer *pBuffer = nullptr;
- size_t size = 0;
+ DWORD size = 0;
bool used = false;
} Buffer;
@@ -79,7 +79,7 @@ private:
static void wmv9_buffer_destruct(LAVFrame *pFrame);
- IMFMediaBuffer *GetBuffer(size_t sRequiredSize);
+ IMFMediaBuffer *GetBuffer(DWORD dwRequiredSize);
void ReleaseBuffer(IMFMediaBuffer *pBuffer);
private:
diff --git a/decoder/LAVVideo/parsers/VC1HeaderParser.cpp b/decoder/LAVVideo/parsers/VC1HeaderParser.cpp
index eb48ff7a..b71d6e7e 100644
--- a/decoder/LAVVideo/parsers/VC1HeaderParser.cpp
+++ b/decoder/LAVVideo/parsers/VC1HeaderParser.cpp
@@ -143,7 +143,7 @@ void CVC1HeaderParser::ParseVC1Header(const BYTE *pData, size_t length, AVCodecI
} else if (codec == AV_CODEC_ID_WMV3) {
if (length < 4)
return;
- init_get_bits(&gb, pData, length * 8);
+ init_get_bits8(&gb, pData, (int)length);
VC1ParseSequenceHeader(&gb);
}
}
@@ -235,7 +235,7 @@ AVPictureType CVC1HeaderParser::ParseVC1PictureType(const uint8_t *buf, int bufl
}
if (framestart) {
GetBitContext gb;
- init_get_bits(&gb, framestart, (buflen - (framestart - buf)) * 8);
+ init_get_bits8(&gb, framestart, (int)(buflen - (framestart - buf)));
if (hdr.profile == PROFILE_ADVANCED) {
int fcm = PROGRESSIVE;
if (hdr.interlaced)
diff --git a/decoder/LAVVideo/subtitles/LAVSubtitleProvider.cpp b/decoder/LAVVideo/subtitles/LAVSubtitleProvider.cpp
index dd9e8220..c522d576 100644
--- a/decoder/LAVVideo/subtitles/LAVSubtitleProvider.cpp
+++ b/decoder/LAVVideo/subtitles/LAVSubtitleProvider.cpp
@@ -166,7 +166,7 @@ STDMETHODIMP CLAVSubtitleProvider::InitDecoder(const CMediaType *pmt, AVCodecID
getExtraData((const BYTE *)pmt->Format(), pmt->FormatType(), pmt->FormatLength(), extra, nullptr);
m_pAVCtx->extradata = extra;
- m_pAVCtx->extradata_size = extralen;
+ m_pAVCtx->extradata_size = (int)extralen;
}
if (pmt->formattype == FORMAT_SubtitleInfo) {