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
3dc677cc
Commit
3dc677cc
authored
Aug 25, 2009
by
Chris Robinson
Committed by
Alexandre Julliard
Aug 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemp3.acm: Fix reading/decoding loop.
parent
ebe5219c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
24 deletions
+25
-24
mpegl3.c
dlls/winemp3.acm/mpegl3.c
+25
-24
No files found.
dlls/winemp3.acm/mpegl3.c
View file @
3dc677cc
...
...
@@ -151,39 +151,40 @@ static void mp3_horse(PACMDRVSTREAMINSTANCE adsi,
DWORD
dpos
=
0
;
ret
=
mpg123_feed
(
amd
->
mh
,
src
,
*
nsrc
);
if
(
ret
!=
MPG123_OK
)
if
(
*
nsrc
>
0
)
{
ERR
(
"Error feeding data
\n
"
);
*
ndst
=
*
nsrc
=
0
;
return
;
}
ret
=
mpg123_read
(
amd
->
mh
,
NULL
,
0
,
&
size
);
if
(
ret
==
MPG123_NEW_FORMAT
)
{
if
TRACE_ON
(
mpeg3
)
ret
=
mpg123_feed
(
amd
->
mh
,
src
,
*
nsrc
);
if
(
ret
!=
MPG123_OK
)
{
long
rate
;
int
channels
,
enc
;
mpg123_getformat
(
amd
->
mh
,
&
rate
,
&
channels
,
&
enc
);
TRACE
(
"New format: %li Hz, %i channels, encoding value %i
\n
"
,
rate
,
channels
,
enc
);
ERR
(
"Error feeding data
\n
"
);
*
ndst
=
*
nsrc
=
0
;
return
;
}
}
else
if
(
ret
==
MPG123_ERR
)
{
FIXME
(
"Error occurred during decoding!
\n
"
);
*
ndst
=
*
nsrc
=
0
;
return
;
}
do
{
dpos
+=
size
;
if
(
*
ndst
-
dpos
<
4608
)
break
;
size
=
0
;
ret
=
mpg123_read
(
amd
->
mh
,
dst
+
dpos
,
*
ndst
-
dpos
,
&
size
);
if
(
ret
==
MPG123_ERR
)
{
FIXME
(
"Error occurred during decoding!
\n
"
);
*
ndst
=
*
nsrc
=
0
;
return
;
}
if
(
ret
==
MPG123_NEW_FORMAT
)
{
if
TRACE_ON
(
mpeg3
)
{
long
rate
;
int
channels
,
enc
;
mpg123_getformat
(
amd
->
mh
,
&
rate
,
&
channels
,
&
enc
);
TRACE
(
"New format: %li Hz, %i channels, encoding value %i
\n
"
,
rate
,
channels
,
enc
);
}
}
dpos
+=
size
;
}
while
(
ret
==
MPG123_OK
);
*
ndst
=
dpos
;
*
nsrc
=
0
;
}
/***********************************************************************
...
...
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