https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e0b67a29901cfe1ef11608fd72a24c48aa9525f1

commit e0b67a29901cfe1ef11608fd72a24c48aa9525f1
Author:     Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com>
AuthorDate: Thu Feb 15 22:08:47 2024 +0900
Commit:     GitHub <nore...@github.com>
CommitDate: Thu Feb 15 17:08:47 2024 +0400

    [MSVIDC32] Keep using CRAM_MAGIC for info structure validation (#6498)
    
    CRAM_MAGIC is being used to validate the info context structure contents
    when the driver routines are being called, so partially revert 8be912147.
    
    Just report "MSVC" as the main FourCC handler in CRAM_GetInfo() instead.
    
    CORE-19453 CORE-15382
---
 dll/win32/msvidc32/msvideo1.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dll/win32/msvidc32/msvideo1.c b/dll/win32/msvidc32/msvideo1.c
index 578630a39b0..b80033f3f11 100644
--- a/dll/win32/msvidc32/msvideo1.c
+++ b/dll/win32/msvidc32/msvideo1.c
@@ -538,7 +538,11 @@ static LRESULT CRAM_GetInfo( const Msvideo1Context *info, 
ICINFO *icinfo, DWORD
 
     icinfo->dwSize = sizeof(ICINFO);
     icinfo->fccType = ICTYPE_VIDEO;
+#ifdef __REACTOS__
+    icinfo->fccHandler = MSVC_MAGIC;
+#else
     icinfo->fccHandler = info ? info->dwMagic : CRAM_MAGIC;
+#endif
     icinfo->dwFlags = 0;
     icinfo->dwVersion = ICVERSION;
     icinfo->dwVersionICM = ICVERSION;
@@ -583,11 +587,7 @@ LRESULT WINAPI CRAM_DriverProc( DWORD_PTR dwDriverId, 
HDRVR hdrvr, UINT msg,
         if( info )
         {
             memset( info, 0, sizeof *info );
-#ifdef __REACTOS__
-            info->dwMagic = MSVC_MAGIC;
-#else
             info->dwMagic = CRAM_MAGIC;
-#endif
         }
         r = (LRESULT) info;
         break;

Reply via email to