Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
586d9e14
Commit
586d9e14
authored
Jun 10, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Jun 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemp3: Try to find a valid header instead of failing immediately.
After seeking there might be some initial garbage, this makes it ignore it.
parent
13281501
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
common.c
dlls/winemp3.acm/common.c
+5
-3
interface.c
dlls/winemp3.acm/interface.c
+9
-2
mpegl3.c
dlls/winemp3.acm/mpegl3.c
+4
-2
No files found.
dlls/winemp3.acm/common.c
View file @
586d9e14
...
...
@@ -71,7 +71,7 @@ int head_check(unsigned long head)
/*
*
the
code a header and write the information
*
de
code a header and write the information
* into the frame structure
*/
int
decode_header
(
struct
frame
*
fr
,
unsigned
long
newhead
)
...
...
@@ -127,10 +127,11 @@ int decode_header(struct frame *fr,unsigned long newhead)
fr
->
framesize
=
(
long
)
tabsel_123
[
fr
->
lsf
][
0
][
fr
->
bitrate_index
]
*
12000
;
fr
->
framesize
/=
freqs
[
fr
->
sampling_frequency
];
fr
->
framesize
=
((
fr
->
framesize
+
fr
->
padding
)
<<
2
)
-
4
;
break
;
#else
FIXME
(
"Layer 1 not supported!
\n
"
);
return
0
;
#endif
break
;
case
2
:
#ifdef LAYER2
#if 0
...
...
@@ -140,10 +141,11 @@ int decode_header(struct frame *fr,unsigned long newhead)
fr
->
framesize
=
(
long
)
tabsel_123
[
fr
->
lsf
][
1
][
fr
->
bitrate_index
]
*
144000
;
fr
->
framesize
/=
freqs
[
fr
->
sampling_frequency
];
fr
->
framesize
+=
fr
->
padding
-
4
;
break
;
#else
FIXME
(
"Layer 2 not supported!
\n
"
);
return
0
;
#endif
break
;
case
3
:
#if 0
fr->do_layer = do_layer3;
...
...
dlls/winemp3.acm/interface.c
View file @
586d9e14
...
...
@@ -170,12 +170,19 @@ int decodeMP3(struct mpstr *mp,const unsigned char *in,int isize,unsigned char *
/* First decode header */
if
(
mp
->
framesize
==
0
)
{
int
ret
;
if
(
mp
->
bsize
<
4
)
{
return
MP3_NEED_MORE
;
}
read_head
(
mp
);
if
(
decode_header
(
&
mp
->
fr
,
mp
->
header
)
==
0
)
{
return
MP3_ERR
;
while
(
!
(
ret
=
decode_header
(
&
mp
->
fr
,
mp
->
header
))
&&
mp
->
bsize
)
{
mp
->
header
=
mp
->
header
<<
8
;
mp
->
header
|=
read_buf_byte
(
mp
);
}
if
(
!
ret
)
{
return
MP3_NEED_MORE
;
}
mp
->
framesize
=
mp
->
fr
.
framesize
;
}
...
...
dlls/winemp3.acm/mpegl3.c
View file @
586d9e14
...
...
@@ -167,6 +167,8 @@ static void mp3_horse(PACMDRVSTREAMINSTANCE adsi,
buffered_during
=
get_num_buffered_bytes
(
&
amd
->
mp
);
if
(
ret
!=
MP3_OK
)
{
if
(
ret
==
MP3_ERR
)
FIXME
(
"Error occured during decoding!
\n
"
);
*
ndst
=
*
nsrc
=
0
;
return
;
}
...
...
@@ -394,7 +396,7 @@ static LRESULT MPEG3_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
* MPEG3_Reset
*
*/
static
void
MPEG3_Reset
(
PACMDRVSTREAMINSTANCE
adsi
,
AcmMpeg3Data
*
aad
)
static
void
MPEG3_Reset
(
PACMDRVSTREAMINSTANCE
adsi
,
AcmMpeg3Data
*
aad
)
{
ClearMP3Buffer
(
&
aad
->
mp
);
InitMP3
(
&
aad
->
mp
);
...
...
@@ -540,7 +542,7 @@ static LRESULT MPEG3_StreamConvert(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMHEAD
*/
if
((
adsh
->
fdwConvert
&
ACM_STREAMCONVERTF_START
))
{
MPEG3_Reset
(
adsi
,
aad
);
MPEG3_Reset
(
adsi
,
aad
);
}
aad
->
convert
(
adsi
,
adsh
->
pbSrc
,
&
nsrc
,
adsh
->
pbDst
,
&
ndst
);
...
...
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