Commit 98c0f3da authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

mfplat: Use correct integral types.

parent 8b17e3e8
......@@ -49,7 +49,7 @@ struct buffer
struct
{
BYTE *linear_buffer;
unsigned int plane_size;
DWORD plane_size;
BYTE *scanline0;
unsigned int width;
......@@ -1306,9 +1306,10 @@ static p_copy_image_func get_2d_buffer_copy_func(DWORD fourcc)
static HRESULT create_2d_buffer(DWORD width, DWORD height, DWORD fourcc, BOOL bottom_up, IMFMediaBuffer **buffer)
{
unsigned int stride, max_length, plane_size;
struct buffer *object;
unsigned int stride, max_length;
unsigned int row_alignment;
struct buffer *object;
DWORD plane_size;
GUID subtype;
BOOL is_yuv;
HRESULT hr;
......
......@@ -702,9 +702,10 @@ static HRESULT register_transform(const CLSID *clsid, const WCHAR *name, UINT32
HRESULT hr = S_OK;
HKEY hclsid = 0;
WCHAR buffer[64];
DWORD size, ret;
WCHAR str[250];
UINT8 *blob;
UINT32 size;
DWORD ret;
guid_to_string(buffer, clsid);
swprintf(str, ARRAY_SIZE(str), L"%s\\%s", transform_keyW, buffer);
......@@ -6094,8 +6095,9 @@ static const IRtwqAsyncCallbackVtbl source_resolver_callback_url_vtbl =
static HRESULT resolver_create_registered_handler(HKEY hkey, REFIID riid, void **handler)
{
unsigned int j = 0, name_length, type;
DWORD name_length, type;
HRESULT hr = E_FAIL;
unsigned int j = 0;
WCHAR clsidW[39];
CLSID clsid;
......@@ -9207,7 +9209,7 @@ static ULONGLONG lldiv128(ULARGE_INTEGER c1, ULARGE_INTEGER c0, LONGLONG denom)
{
ULARGE_INTEGER q1, q0, rhat;
ULARGE_INTEGER v, cmp1, cmp2;
unsigned int s = 0;
DWORD s = 0;
v.QuadPart = llabs(denom);
......
......@@ -2926,8 +2926,10 @@ HRESULT WINAPI MFCreateWaveFormatExFromMFMediaType(IMFMediaType *mediatype, WAVE
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_NUM_CHANNELS, &value)))
format->nChannels = value;
IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &format->nSamplesPerSec);
IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, &format->nAvgBytesPerSec);
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &value)))
format->nSamplesPerSec = value;
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, &value)))
format->nAvgBytesPerSec = value;
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &value)))
format->nBlockAlign = value;
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_BITS_PER_SAMPLE, &value)))
......@@ -2939,7 +2941,8 @@ HRESULT WINAPI MFCreateWaveFormatExFromMFMediaType(IMFMediaType *mediatype, WAVE
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_VALID_BITS_PER_SAMPLE, &value)))
format_ext->Samples.wSamplesPerBlock = value;
IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_CHANNEL_MASK, &format_ext->dwChannelMask);
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_CHANNEL_MASK, &value)))
format_ext->dwChannelMask = value;
memcpy(&format_ext->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM, sizeof(format_ext->SubFormat));
}
......@@ -3085,8 +3088,8 @@ HRESULT WINAPI MFCreateAudioMediaType(const WAVEFORMATEX *format, IMFAudioMediaT
return S_OK;
}
static void media_type_get_ratio(IMFMediaType *media_type, const GUID *attr, UINT32 *numerator,
UINT32 *denominator)
static void media_type_get_ratio(IMFMediaType *media_type, const GUID *attr, DWORD *numerator,
DWORD *denominator)
{
UINT64 value;
......@@ -3102,7 +3105,7 @@ static void media_type_get_ratio(IMFMediaType *media_type, const GUID *attr, UIN
*/
HRESULT WINAPI MFCreateMFVideoFormatFromMFMediaType(IMFMediaType *media_type, MFVIDEOFORMAT **video_format, UINT32 *size)
{
UINT32 flags, palette_size = 0, avgrate;
UINT32 flags, palette_size = 0, value;
MFVIDEOFORMAT *format;
INT32 stride;
GUID guid;
......@@ -3162,11 +3165,12 @@ HRESULT WINAPI MFCreateMFVideoFormatFromMFMediaType(IMFMediaType *media_type, MF
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_DEFAULT_STRIDE, (UINT32 *)&stride)) && stride < 0)
format->videoInfo.VideoFlags |= MFVideoFlag_BottomUpLinearRep;
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_AVG_BITRATE, &avgrate)))
format->compressedInfo.AvgBitrate = avgrate;
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_AVG_BIT_ERROR_RATE, &avgrate)))
format->compressedInfo.AvgBitErrorRate = avgrate;
IMFMediaType_GetUINT32(media_type, &MF_MT_MAX_KEYFRAME_SPACING, &format->compressedInfo.MaxKeyFrameSpacing);
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_AVG_BITRATE, &value)))
format->compressedInfo.AvgBitrate = value;
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_AVG_BIT_ERROR_RATE, &value)))
format->compressedInfo.AvgBitErrorRate = value;
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_MAX_KEYFRAME_SPACING, &value)))
format->compressedInfo.MaxKeyFrameSpacing = value;
/* Palette. */
if (palette_size)
......
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