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
4245b119
Commit
4245b119
authored
Jul 19, 2023
by
Jeff Smith
Committed by
Alexandre Julliard
Jul 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Set correct frame delay when GCE is missing.
parent
8c6e5788
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
image.c
dlls/gdiplus/image.c
+3
-1
image.c
dlls/gdiplus/tests/image.c
+30
-0
No files found.
dlls/gdiplus/image.c
View file @
4245b119
...
...
@@ -3302,6 +3302,7 @@ static void gif_metadata_reader(GpBitmap *bitmap, IWICBitmapDecoder *decoder, UI
if
(
delay
)
{
LONG
*
value
;
LONG
frame_delay
=
0
;
delay
->
type
=
PropertyTagTypeLong
;
delay
->
id
=
PropertyTagFrameDelay
;
...
...
@@ -3315,9 +3316,10 @@ static void gif_metadata_reader(GpBitmap *bitmap, IWICBitmapDecoder *decoder, UI
hr
=
IWICBitmapDecoder_GetFrame
(
decoder
,
i
,
&
frame
);
if
(
hr
==
S_OK
)
{
get_gif_frame_property
(
frame
,
&
GUID_MetadataFormatGCE
,
L"Delay"
,
&
value
[
i
]
);
get_gif_frame_property
(
frame
,
&
GUID_MetadataFormatGCE
,
L"Delay"
,
&
frame_delay
);
IWICBitmapFrameDecode_Release
(
frame
);
}
value
[
i
]
=
frame_delay
;
}
}
...
...
dlls/gdiplus/tests/image.c
View file @
4245b119
...
...
@@ -4859,6 +4859,24 @@ static const BYTE gif_2frame_no_pal[] = {
0x02
,
0x02
,
0x44
,
0x01
,
0x00
,
0x3b
};
static
const
BYTE
gif_2frame_missing_gce1
[]
=
{
'G'
,
'I'
,
'F'
,
'8'
,
'7'
,
'a'
,
0x01
,
0x00
,
0x01
,
0x00
,
0x21
,
0x02
,
0x00
,
0x2c
,
0x00
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x01
,
0x00
,
0x01
,
0x02
,
0x02
,
0x44
,
0x01
,
0x00
,
0x21
,
0xF9
,
0x04
,
0x00
,
0x14
,
0x00
,
0x08
,
0x00
,
0x2c
,
0x00
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x01
,
0x00
,
0x01
,
0x02
,
0x02
,
0x44
,
0x01
,
0x00
,
0x3b
};
static
const
BYTE
gif_2frame_missing_gce2
[]
=
{
'G'
,
'I'
,
'F'
,
'8'
,
'7'
,
'a'
,
0x01
,
0x00
,
0x01
,
0x00
,
0x21
,
0x02
,
0x00
,
0x21
,
0xF9
,
0x04
,
0x00
,
0x0A
,
0x00
,
0x08
,
0x00
,
0x2c
,
0x00
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x01
,
0x00
,
0x01
,
0x02
,
0x02
,
0x44
,
0x01
,
0x00
,
0x2c
,
0x00
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x01
,
0x00
,
0x01
,
0x02
,
0x02
,
0x44
,
0x01
,
0x00
,
0x3b
};
static
const
BYTE
gif_no_pal
[]
=
{
'G'
,
'I'
,
'F'
,
'8'
,
'7'
,
'a'
,
0x01
,
0x00
,
0x01
,
0x00
,
0x27
,
0x02
,
0x00
,
0x2c
,
0x00
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x01
,
0x00
,
0x01
,
...
...
@@ -4888,6 +4906,16 @@ static void test_gif_properties(void)
{
PropertyTagTypeLong
,
PropertyTagFrameDelay
,
8
,
{
10
,
0
,
0
,
0
,
20
,
0
,
0
,
0
}
},
{
PropertyTagTypeShort
,
PropertyTagLoopCount
,
2
,
{
1
,
0
}
},
};
static
const
struct
property_test_data
gif_2frame_missing_gce1_props
[]
=
{
{
PropertyTagTypeLong
,
PropertyTagFrameDelay
,
8
,
{
0
,
0
,
0
,
0
,
20
,
0
,
0
,
0
}
},
{
PropertyTagTypeShort
,
PropertyTagLoopCount
,
2
,
{
1
,
0
}
},
};
static
const
struct
property_test_data
gif_2frame_missing_gce2_props
[]
=
{
{
PropertyTagTypeLong
,
PropertyTagFrameDelay
,
8
,
{
10
,
0
,
0
,
0
,
10
,
0
,
0
,
0
}
},
{
PropertyTagTypeShort
,
PropertyTagLoopCount
,
2
,
{
1
,
0
}
},
};
static
const
struct
property_test_data
gif_no_pal_props
[]
=
{
{
PropertyTagTypeLong
,
PropertyTagFrameDelay
,
4
,
{
0
,
0
,
0
,
0
}
},
...
...
@@ -4906,6 +4934,8 @@ static void test_gif_properties(void)
giftest
(
animatedgif
,
animatedgif_props
,
2
),
giftest
(
gif_2frame_global_pal
,
gif_2frame_global_pal_props
,
2
),
giftest
(
gif_2frame_no_pal
,
gif_2frame_no_pal_props
,
2
),
giftest
(
gif_2frame_missing_gce1
,
gif_2frame_missing_gce1_props
,
2
),
giftest
(
gif_2frame_missing_gce2
,
gif_2frame_missing_gce2_props
,
2
),
giftest
(
gif_no_pal
,
gif_no_pal_props
,
1
),
#undef giftest
};
...
...
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