Nikolay Sivov : mfplat/tests: Add some more tests for IsCompressedFormat().

Alexandre Julliard julliard at winehq.org
Thu Apr 8 16:14:03 CDT 2021


Module: wine
Branch: master
Commit: 8511670b37214f95b37bb811118c673a7d84ea9d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8511670b37214f95b37bb811118c673a7d84ea9d

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Apr  8 12:31:20 2021 +0300

mfplat/tests: Add some more tests for IsCompressedFormat().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mfplat/tests/mfplat.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c
index c21a57be27f..c33d540ba4b 100644
--- a/dlls/mfplat/tests/mfplat.c
+++ b/dlls/mfplat/tests/mfplat.c
@@ -993,14 +993,28 @@ if(0)
     ok(hr == S_OK, "Failed to get media type property, hr %#x.\n", hr);
     ok(compressed, "Unexpected value %d.\n", compressed);
 
+    hr = IMFMediaType_SetUINT32(mediatype, &MF_MT_COMPRESSED, 0);
+    ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr);
+
+    compressed = FALSE;
+    hr = IMFMediaType_IsCompressedFormat(mediatype, &compressed);
+    ok(hr == S_OK, "Failed to get media type property, hr %#x.\n", hr);
+    ok(compressed, "Unexpected value %d.\n", compressed);
+
     hr = IMFMediaType_SetUINT32(mediatype, &MF_MT_ALL_SAMPLES_INDEPENDENT, 1);
     ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr);
 
+    hr = IMFMediaType_SetUINT32(mediatype, &MF_MT_COMPRESSED, 1);
+    ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr);
+
     compressed = TRUE;
     hr = IMFMediaType_IsCompressedFormat(mediatype, &compressed);
     ok(hr == S_OK, "Failed to get media type property, hr %#x.\n", hr);
     ok(!compressed, "Unexpected value %d.\n", compressed);
 
+    hr = IMFMediaType_DeleteItem(mediatype, &MF_MT_COMPRESSED);
+    ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+
     hr = IMFMediaType_SetGUID(mediatype, &MF_MT_MAJOR_TYPE, &MFMediaType_Video);
     ok(hr == S_OK, "Failed to set GUID value, hr %#x.\n", hr);
 




More information about the wine-cvs mailing list