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
cf73a26c
Commit
cf73a26c
authored
Jan 12, 2010
by
Julius Schwartzenberg
Committed by
Alexandre Julliard
Jan 14, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avifil32: Overwrite dwRate in the audiostream with the nBlockAlign from the wave header.
parent
3cbaaaa5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
avifile.c
dlls/avifil32/avifile.c
+8
-1
api.c
dlls/avifil32/tests/api.c
+2
-2
No files found.
dlls/avifil32/avifile.c
View file @
cf73a26c
...
...
@@ -1819,7 +1819,14 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This)
if
(
FAILED
(
hr
))
return
hr
;
};
if
(
pStream
->
lpFormat
!=
NULL
&&
pStream
->
sInfo
.
fccType
==
streamtypeAUDIO
)
{
WAVEFORMATEX
*
wfx
=
pStream
->
lpFormat
;
/* wfx->nBlockAlign = wfx->nChannels * wfx->wBitsPerSample / 8; could be added */
pStream
->
sInfo
.
dwSampleSize
=
wfx
->
nBlockAlign
;
/* to deal with corrupt wfx->nBlockAlign but Windows doesn't do this */
TRACE
(
"Block size reset to %u, chan=%u bpp=%u
\n
"
,
wfx
->
nBlockAlign
,
wfx
->
nChannels
,
wfx
->
wBitsPerSample
);
pStream
->
sInfo
.
dwScale
=
1
;
pStream
->
sInfo
.
dwRate
=
wfx
->
nSamplesPerSec
;
}
if
(
mmioAscend
(
This
->
hmmio
,
&
ck
,
0
)
!=
S_OK
)
return
AVIERR_FILEREAD
;
}
...
...
dlls/avifil32/tests/api.c
View file @
cf73a26c
...
...
@@ -404,7 +404,7 @@ static void test_ash1_corruption(void)
/* The result will still be 2, because the value is dynamically replaced with the nBlockAlign
value from the stream format header. The next test will prove this */
todo_wine
{
ok
(
asi1
.
dwSampleSize
==
2
,
"got %u (expected 2)
\n
"
,
asi1
.
dwSampleSize
);
}
ok
(
asi1
.
dwSampleSize
==
2
,
"got %u (expected 2)
\n
"
,
asi1
.
dwSampleSize
);
AVIStreamRelease
(
pStream1
);
AVIFileRelease
(
pFile
);
...
...
@@ -438,7 +438,7 @@ static void test_ash1_corruption2(void)
ok
(
AVIStreamInfo
(
pStream1
,
&
asi1
,
sizeof
(
AVISTREAMINFO
))
==
0
,
"Unable to read stream info
\n
"
);
/* The result will also be the corrupt value, as explained above. */
todo_wine
{
ok
(
asi1
.
dwSampleSize
==
0xdead
,
"got 0x%x (expected 0xdead)
\n
"
,
asi1
.
dwSampleSize
);
}
ok
(
asi1
.
dwSampleSize
==
0xdead
,
"got 0x%x (expected 0xdead)
\n
"
,
asi1
.
dwSampleSize
);
AVIStreamRelease
(
pStream1
);
AVIFileRelease
(
pFile
);
...
...
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