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
cc9e70a8
Commit
cc9e70a8
authored
Oct 20, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Oct 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvfw32: Ask the codec to fill the lpbiOutput info when it is not available.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4a9d238c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
msvideo_main.c
dlls/msvfw32/msvideo_main.c
+33
-0
No files found.
dlls/msvfw32/msvideo_main.c
View file @
cc9e70a8
...
...
@@ -1408,6 +1408,12 @@ static void clear_compvars(PCOMPVARS pc)
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsOut
);
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpState
);
pc
->
lpbiIn
=
pc
->
lpBitsPrev
=
pc
->
lpBitsOut
=
pc
->
lpState
=
NULL
;
if
(
pc
->
dwFlags
&
0x80000000
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pc
->
lpBitsOut
);
pc
->
lpBitsOut
=
NULL
;
pc
->
dwFlags
&=
~
0x80000000
;
}
}
/***********************************************************************
...
...
@@ -1445,6 +1451,33 @@ BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn)
pc
->
cbState
=
sizeof
(
ICCOMPRESS
);
if
(
!
pc
->
lpbiOut
)
{
pc
->
lpbiOut
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
BITMAPINFO
));
if
(
!
pc
->
lpbiOut
)
goto
error
;
ret
=
ICSendMessage
(
pc
->
hic
,
ICM_COMPRESS_GET_FORMAT
,
(
DWORD_PTR
)
pc
->
lpbiIn
,
(
DWORD_PTR
)
pc
->
lpbiOut
);
if
(
ret
!=
ICERR_OK
)
{
ERR
(
"Could not get output format from compressor
\n
"
);
goto
error
;
}
if
(
!
pc
->
lpbiOut
->
bmiHeader
.
biSizeImage
)
{
/* If we can't know the output frame size for sure at least allocate
* the same size of the input frame and also at least 8Kb to be sure
* that poor compressors will have enough memory to work if the input
* frame is too small.
*/
pc
->
lpbiOut
->
bmiHeader
.
biSizeImage
=
max
(
8192
,
pc
->
lpbiIn
->
bmiHeader
.
biSizeImage
);
ERR
(
"Bad codec! Invalid output frame size, guessing from input
\n
"
);
}
/* Flag to show that we allocated lpbiOutput for proper cleanup */
pc
->
dwFlags
|=
0x80000000
;
}
TRACE
(
"Input: %ux%u, fcc %s, bpp %u, size %u
\n
"
,
pc
->
lpbiIn
->
bmiHeader
.
biWidth
,
pc
->
lpbiIn
->
bmiHeader
.
biHeight
,
wine_dbgstr_fcc
(
pc
->
lpbiIn
->
bmiHeader
.
biCompression
),
...
...
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