[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [PATCH 1/6] amstream: Fix AMAudioData::QueryInterface.
From: Nikolay Sivov <bunglehead () gmail ! com>
Date: 2016-07-27 14:39:26
Message-ID: 55c890e7-845a-670d-94d1-ccd5b3564a31 () gmail ! com
[Download RAW message or body]
On 27.07.2016 15:51, Anton Baskanov wrote:
> Signed-off-by: Anton Baskanov <baskanov@gmail.com>
> ---
> dlls/amstream/audiodata.c | 1 -
> dlls/amstream/tests/Makefile.in | 3 +-
> dlls/amstream/tests/audiodata.c | 67 +++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 69 insertions(+), 2 deletions(-)
> create mode 100755 dlls/amstream/tests/audiodata.c
Hi, Anton.
Please keep tests in existing amstream.c file.
+
> +static void test_query_interface(void)
> +{
> + IUnknown *unknown = create_audio_data();
> + IMemoryData *memory_data = NULL;
> + IAudioData *audio_data = NULL;
> +
> + HRESULT result = S_OK;
result initialization is not needed;
> +
> + result = IUnknown_QueryInterface(unknown, &IID_IMemoryData, (void **)&memory_data);
> + ok(E_NOINTERFACE == result, "got 0x%08x\n", result);
> + if (S_OK == result)
> + {
> + IMemoryData_Release(memory_data);
> + }
If it always fails, there's no reason add conditional Release.
> +
> + result = IUnknown_QueryInterface(unknown, &IID_IAudioData, (void **)&audio_data);
> + ok(S_OK == result, "got 0x%08x\n", result);
> + if (S_OK == result)
> + {
> + IAudioData_Release(audio_data);
> + }
> +
> + IUnknown_Release(unknown);
> +}
Could you check if you can query IMemoryData from IAudioData? It seems
really weird if parent interface is not supported at all.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic