windowscodecs: Use a smaller magic number to detect JPEG files.
Vincent Povirk
vincent at codeweavers.com
Thu Oct 13 13:32:17 CDT 2011
-------------- next part --------------
From da35c25923ffca2d7a1991705348c8392d882a51 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 11 Oct 2011 11:36:05 -0500
Subject: [PATCH] windowscodecs: Use a smaller magic number to detect JPEG files.
This lets us detect some different JPEG versions.
---
dlls/windowscodecs/regsvr.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c
index 1ea0aa0..bc12e40 100644
--- a/dlls/windowscodecs/regsvr.c
+++ b/dlls/windowscodecs/regsvr.c
@@ -720,7 +720,7 @@ static struct decoder_pattern const ico_patterns[] = {
{0}
};
-static const BYTE jpeg_magic[] = {0xff, 0xd8, 0xff, 0xe0};
+static const BYTE jpeg_magic[] = {0xff, 0xd8};
static GUID const * const jpeg_formats[] = {
&GUID_WICPixelFormat24bppBGR,
@@ -730,7 +730,7 @@ static GUID const * const jpeg_formats[] = {
};
static struct decoder_pattern const jpeg_patterns[] = {
- {4,0,jpeg_magic,mask_all,0},
+ {2,0,jpeg_magic,mask_all,0},
{0}
};
--
1.7.4.1
More information about the wine-patches
mailing list