Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f8d2c922
Commit
f8d2c922
authored
Jul 24, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Do not assume that vtable is the first element of the object,…
windowscodecs: Do not assume that vtable is the first element of the object, avoid not necessary casts.
parent
b7efa008
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
jpegformat.c
dlls/windowscodecs/jpegformat.c
+13
-10
No files found.
dlls/windowscodecs/jpegformat.c
View file @
f8d2c922
...
...
@@ -175,9 +175,10 @@ static HRESULT WINAPI JpegDecoder_QueryInterface(IWICBitmapDecoder *iface, REFII
if
(
!
ppv
)
return
E_INVALIDARG
;
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapDecoder
,
iid
))
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapDecoder
,
iid
))
{
*
ppv
=
This
;
*
ppv
=
&
This
->
IWICBitmapDecoder_iface
;
}
else
{
...
...
@@ -469,6 +470,8 @@ static const IWICBitmapDecoderVtbl JpegDecoder_Vtbl = {
static
HRESULT
WINAPI
JpegDecoder_Frame_QueryInterface
(
IWICBitmapFrameDecode
*
iface
,
REFIID
iid
,
void
**
ppv
)
{
JpegDecoder
*
This
=
impl_from_IWICBitmapFrameDecode
(
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
iid
),
ppv
);
if
(
!
ppv
)
return
E_INVALIDARG
;
...
...
@@ -477,7 +480,7 @@ static HRESULT WINAPI JpegDecoder_Frame_QueryInterface(IWICBitmapFrameDecode *if
IsEqualIID
(
&
IID_IWICBitmapSource
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapFrameDecode
,
iid
))
{
*
ppv
=
iface
;
*
ppv
=
&
This
->
IWICBitmapFrameDecode_
iface
;
}
else
{
...
...
@@ -492,13 +495,13 @@ static HRESULT WINAPI JpegDecoder_Frame_QueryInterface(IWICBitmapFrameDecode *if
static
ULONG
WINAPI
JpegDecoder_Frame_AddRef
(
IWICBitmapFrameDecode
*
iface
)
{
JpegDecoder
*
This
=
impl_from_IWICBitmapFrameDecode
(
iface
);
return
I
Unknown_AddRef
((
IUnknown
*
)
This
);
return
I
WICBitmapDecoder_AddRef
(
&
This
->
IWICBitmapDecoder_iface
);
}
static
ULONG
WINAPI
JpegDecoder_Frame_Release
(
IWICBitmapFrameDecode
*
iface
)
{
JpegDecoder
*
This
=
impl_from_IWICBitmapFrameDecode
(
iface
);
return
I
Unknown_Release
((
IUnknown
*
)
This
);
return
I
WICBitmapDecoder_Release
(
&
This
->
IWICBitmapDecoder_iface
);
}
static
HRESULT
WINAPI
JpegDecoder_Frame_GetSize
(
IWICBitmapFrameDecode
*
iface
,
...
...
@@ -722,8 +725,8 @@ HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
InitializeCriticalSection
(
&
This
->
lock
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": JpegDecoder.lock"
);
ret
=
I
Unknown_QueryInterface
((
IUnknown
*
)
This
,
iid
,
ppv
);
I
Unknown_Release
((
IUnknown
*
)
This
);
ret
=
I
WICBitmapDecoder_QueryInterface
(
&
This
->
IWICBitmapDecoder_iface
,
iid
,
ppv
);
I
WICBitmapDecoder_Release
(
&
This
->
IWICBitmapDecoder_iface
);
return
ret
;
}
...
...
@@ -1219,7 +1222,7 @@ static HRESULT WINAPI JpegEncoder_QueryInterface(IWICBitmapEncoder *iface, REFII
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapEncoder
,
iid
))
{
*
ppv
=
This
;
*
ppv
=
&
This
->
IWICBitmapEncoder_iface
;
}
else
{
...
...
@@ -1470,8 +1473,8 @@ HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv)
InitializeCriticalSection
(
&
This
->
lock
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": JpegEncoder.lock"
);
ret
=
I
Unknown_QueryInterface
((
IUnknown
*
)
This
,
iid
,
ppv
);
I
Unknown_Release
((
IUnknown
*
)
This
);
ret
=
I
WICBitmapEncoder_QueryInterface
(
&
This
->
IWICBitmapEncoder_iface
,
iid
,
ppv
);
I
WICBitmapEncoder_Release
(
&
This
->
IWICBitmapEncoder_iface
);
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment