[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: wine-devel Digest, Vol 132, Issue 55
From:       Anton Baskanov <baskanov () gmail ! com>
Date:       2016-07-28 16:20:40
Message-ID: CAOhzQN7FdUtkSp_LXP=agWEtKadajpS_NZiO8tigJXHKzy4vKg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wed, Jul 27, 2016 at 11:07 PM, <wine-devel-request@winehq.org> wrote:

> ---------- Forwarded message ----------
> From: Nikolay Sivov <bunglehead@gmail.com>
> To: wine-devel@winehq.org
> Cc:
> Date: Wed, 27 Jul 2016 17:39:26 +0300
> Subject: Re: [PATCH 1/6] amstream: Fix AMAudioData::QueryInterface.
> 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.
>

Hi, Nikolay.

Thanks for the review!

I've checked QueryInterface from IAudioData, and it also fails with
IID_IMemoryData.

I've fixed the issues and sent the updated patches.

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 27, 2016 \
at 11:07 PM,  <span dir="ltr">&lt;<a href="mailto:wine-devel-request@winehq.org" \
target="_blank">wine-devel-request@winehq.org</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">---------- Forwarded message ----------<br>From:  \
Nikolay Sivov &lt;<a \
href="mailto:bunglehead@gmail.com">bunglehead@gmail.com</a>&gt;<br>To:  <a \
href="mailto:wine-devel@winehq.org">wine-devel@winehq.org</a><br>Cc:  <br>Date:  Wed, \
27 Jul 2016 17:39:26 +0300<br>Subject:  Re: [PATCH 1/6] amstream: Fix \
AMAudioData::QueryInterface.<br>On 27.07.2016 15:51, Anton Baskanov wrote:<br> &gt; \
Signed-off-by: Anton Baskanov &lt;<a \
href="mailto:baskanov@gmail.com">baskanov@gmail.com</a>&gt;<br> &gt; ---<br>
&gt;   dlls/amstream/audiodata.c           |   1 -<br>
&gt;   dlls/amstream/tests/Makefile.in |   3 +-<br>
&gt;   dlls/amstream/tests/audiodata.c | 67 \
+++++++++++++++++++++++++++++++++++++++++<br> &gt;   3 files changed, 69 \
insertions(+), 2 deletions(-)<br> &gt;   create mode 100755 \
dlls/amstream/tests/audiodata.c<br> <br>
Hi, Anton.<br>
<br>
Please keep tests in existing amstream.c file.<br>
<br>
+<br>
&gt; +static void test_query_interface(void)<br>
&gt; +{<br>
&gt; +      IUnknown *unknown = create_audio_data();<br>
&gt; +      IMemoryData *memory_data = NULL;<br>
&gt; +      IAudioData *audio_data = NULL;<br>
&gt; +<br>
&gt; +      HRESULT result = S_OK;<br>
<br>
result initialization is not needed;<br>
<br>
&gt; +<br>
&gt; +      result = IUnknown_QueryInterface(unknown, &amp;IID_IMemoryData, (void \
**)&amp;memory_data);<br> &gt; +      ok(E_NOINTERFACE == result, &quot;got \
0x%08x\n&quot;, result);<br> &gt; +      if (S_OK == result)<br>
&gt; +      {<br>
&gt; +            IMemoryData_Release(memory_data);<br>
&gt; +      }<br>
<br>
If it always fails, there&#39;s no reason add conditional Release.<br>
<br>
&gt; +<br>
&gt; +      result = IUnknown_QueryInterface(unknown, &amp;IID_IAudioData, (void \
**)&amp;audio_data);<br> &gt; +      ok(S_OK == result, &quot;got 0x%08x\n&quot;, \
result);<br> &gt; +      if (S_OK == result)<br>
&gt; +      {<br>
&gt; +            IAudioData_Release(audio_data);<br>
&gt; +      }<br>
&gt; +<br>
&gt; +      IUnknown_Release(unknown);<br>
&gt; +}<br>
<br>
Could you check if you can query IMemoryData from IAudioData? It seems<br>
really weird if parent interface is not supported at all.<br></blockquote><div>  \
</div><div>Hi, Nikolay.</div><div><br></div><div>Thanks for the \
review!</div><div><br></div><div>I&#39;ve checked QueryInterface from IAudioData, and \
it also fails with IID_IMemoryData.</div><div><br></div><div>I&#39;ve fixed the \
issues and sent the updated patches.</div></div></div></div>


[Attachment #6 (text/plain)]




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic