* Sync up to trunk head (r64377).
[reactos.git] / dll / directx / wine / quartz / avisplit.c
index f651cf7..a1b1c59 100644 (file)
@@ -134,6 +134,7 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
     PullPin *pin = This->Parser.pInputPin;
     IMediaSample *sample = NULL;
     HRESULT hr;
+    ULONG ref;
 
     TRACE("(%p, %u)->()\n", This, streamnumber);
 
@@ -247,7 +248,10 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
             hr = IAsyncReader_Request(pin->pReader, sample, streamnumber);
 
             if (FAILED(hr))
-                assert(IMediaSample_Release(sample) == 0);
+            {
+                ref = IMediaSample_Release(sample);
+                assert(ref == 0);
+            }
         }
         else
         {
@@ -261,7 +265,8 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
         if (sample)
         {
             ERR("There should be no sample!\n");
-            assert(IMediaSample_Release(sample) == 0);
+            ref = IMediaSample_Release(sample);
+            assert(ref == 0);
         }
     }
     TRACE("--> %08x\n", hr);
@@ -493,8 +498,8 @@ static HRESULT AVISplitter_first_request(LPVOID iface)
 static HRESULT AVISplitter_done_process(LPVOID iface)
 {
     AVISplitterImpl *This = iface;
-
     DWORD x;
+    ULONG ref;
 
     for (x = 0; x < This->Parser.cStreams; ++x)
     {
@@ -508,7 +513,10 @@ static HRESULT AVISplitter_done_process(LPVOID iface)
         stream->thread = NULL;
 
         if (stream->sample)
-            assert(IMediaSample_Release(stream->sample) == 0);
+        {
+            ref = IMediaSample_Release(stream->sample);
+            assert(ref == 0);
+        }
         stream->sample = NULL;
 
         ResetEvent(stream->packet_queued);
@@ -1202,6 +1210,7 @@ static HRESULT AVISplitter_Flush(LPVOID iface)
 {
     AVISplitterImpl *This = iface;
     DWORD x;
+    ULONG ref;
 
     TRACE("(%p)->()\n", This);
 
@@ -1210,7 +1219,10 @@ static HRESULT AVISplitter_Flush(LPVOID iface)
         StreamData *stream = This->streams + x;
 
         if (stream->sample)
-            assert(IMediaSample_Release(stream->sample) == 0);
+        {
+            ref = IMediaSample_Release(stream->sample);
+            assert(ref == 0);
+        }
         stream->sample = NULL;
 
         ResetEvent(stream->packet_queued);