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
a90ed505
Commit
a90ed505
authored
Oct 23, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Oct 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvfw32: When no fccHandler is specified return the first valid codec.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
75286b0a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
msvideo_main.c
dlls/msvfw32/msvideo_main.c
+23
-2
msvfw.c
dlls/msvfw32/tests/msvfw.c
+0
-2
No files found.
dlls/msvfw32/msvideo_main.c
View file @
a90ed505
...
...
@@ -436,6 +436,27 @@ HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
TRACE
(
"(%s,%s,0x%08x)
\n
"
,
wine_dbgstr_fcc
(
fccType
),
wine_dbgstr_fcc
(
fccHandler
),
wMode
);
if
(
!
fccHandler
)
/* No specific handler, return the first valid for wMode */
{
HIC
local
;
ICINFO
info
;
DWORD
loop
=
0
;
info
.
dwSize
=
sizeof
(
info
);
while
(
ICInfo
(
fccType
,
loop
++
,
&
info
))
{
/* Ensure fccHandler is not 0x0 because we will recurse on ICOpen */
if
(
!
info
.
fccHandler
)
continue
;
local
=
ICOpen
(
fccType
,
info
.
fccHandler
,
wMode
);
if
(
local
!=
0
)
{
TRACE
(
"Returning %s as defult handler for %s
\n
"
,
wine_dbgstr_fcc
(
info
.
fccHandler
),
wine_dbgstr_fcc
(
fccType
));
return
local
;
}
}
}
/* Check if there is a registered driver that matches */
driver
=
reg_driver_list
;
while
(
driver
)
...
...
@@ -448,7 +469,7 @@ HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
driver
=
driver
->
next
;
if
(
driver
&&
driver
->
proc
)
/* The driver has been registered at runtime with its driverproc */
/* The driver has been registered at runtime with its driverproc */
return
ICOpenFunction
(
fccType
,
fccHandler
,
wMode
,
driver
->
proc
);
/* Well, lParam2 is in fact a LPVIDEO_OPEN_PARMS, but it has the
...
...
@@ -478,7 +499,7 @@ HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
codecname
[
9
]
=
'\0'
;
hdrv
=
OpenDriver
(
codecname
,
drv32W
,
(
LPARAM
)
&
icopen
);
if
(
!
hdrv
)
if
(
!
hdrv
)
return
0
;
}
else
{
/* The driver has been registered at runtime with its name */
...
...
dlls/msvfw32/tests/msvfw.c
View file @
a90ed505
...
...
@@ -31,7 +31,6 @@ static void test_OpenCase(void)
ICINFO
info
;
/* Check if default handler works */
h
=
ICOpen
(
mmioFOURCC
(
'v'
,
'i'
,
'd'
,
'c'
),
0
,
ICMODE_DECOMPRESS
);
todo_wine
ok
(
0
!=
h
,
"ICOpen(vidc.0) failed
\n
"
);
if
(
h
)
{
info
.
dwSize
=
sizeof
(
info
);
...
...
@@ -41,7 +40,6 @@ todo_wine
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
}
h
=
ICOpen
(
mmioFOURCC
(
'v'
,
'i'
,
'd'
,
'c'
),
0
,
ICMODE_COMPRESS
);
todo_wine
ok
(
0
!=
h
||
broken
(
h
==
0
),
"ICOpen(vidc.0) failed
\n
"
);
/* Not present in Win8 */
if
(
h
)
{
info
.
dwSize
=
sizeof
(
info
);
...
...
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