On Sun, Dec 26, 2021 at 11:45 PM Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
On 12/27/21 02:11, Alex Henrie wrote:
- video_stream = NULL; - if (get_event((IMFMediaEventGenerator *)mediasource, MENewStream, &var)) - { - ok(var.vt == VT_UNKNOWN, "Unexpected value type.\n"); - video_stream = (IMFMediaStream *)var.punkVal; - } + ret = get_event((IMFMediaEventGenerator *)mediasource, MENewStream, &var); + ok(ret, "Failed to get event.\n"); + ok(var.vt == VT_UNKNOWN, "Unexpected value type.\n"); + video_stream = (IMFMediaStream *)var.punkVal; The point is that if it's not MENewStream, you won't necessarily have IMFMediaStream in event data.
If that ever happened, the next test would crash because video_stream would be null (hence the Coverity warning). So, as they are currently written, the tests assume that the first call to get_event will succeed. Is there any version of Windows that we care about where the first call to get_event fails? -Alex