Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
e0a8c179
Commit
e0a8c179
authored
Oct 06, 2006
by
Eric Wong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp3_plugin.c: fix compilation with -pedantic and/or gcc 2.95
git-svn-id:
https://svn.musicpd.org/mpd/trunk@4876
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
e1988266
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
mp3_plugin.c
src/inputPlugins/mp3_plugin.c
+20
-16
No files found.
src/inputPlugins/mp3_plugin.c
View file @
e0a8c179
...
@@ -651,23 +651,27 @@ static int decodeFirstFrame(mp3DecodeData * data, DecoderControl * dc,
...
@@ -651,23 +651,27 @@ static int decodeFirstFrame(mp3DecodeData * data, DecoderControl * dc,
/*
/*
* Attempt to calulcate the length of the song from filesize
* Attempt to calulcate the length of the song from filesize
*/
*/
size_t
offset
=
data
->
inStream
->
offset
;
{
mad_timer_t
duration
=
data
->
frame
.
header
.
duration
;
size_t
offset
=
data
->
inStream
->
offset
;
float
frameTime
=
((
float
)
mad_timer_count
(
duration
,
MAD_UNITS_MILLISECONDS
))
/
1000
;
mad_timer_t
duration
=
data
->
frame
.
header
.
duration
;
float
frameTime
=
((
float
)
mad_timer_count
(
duration
,
if
(
data
->
stream
.
this_frame
!=
NULL
)
MAD_UNITS_MILLISECONDS
))
/
1000
;
offset
-=
data
->
stream
.
bufend
-
data
->
stream
.
this_frame
;
else
if
(
data
->
stream
.
this_frame
!=
NULL
)
offset
-=
data
->
stream
.
bufend
-
data
->
stream
.
buffer
;
offset
-=
data
->
stream
.
bufend
-
data
->
stream
.
this_frame
;
else
if
(
data
->
inStream
->
size
>=
offset
)
{
offset
-=
data
->
stream
.
bufend
-
data
->
stream
.
buffer
;
data
->
totalTime
=
((
data
->
inStream
->
size
-
offset
)
*
8
.
0
)
/
(
data
->
frame
).
header
.
bitrate
;
data
->
maxFrames
=
data
->
totalTime
/
frameTime
+
FRAMES_CUSHION
;
if
(
data
->
inStream
->
size
>=
offset
)
{
}
else
{
data
->
totalTime
=
((
data
->
inStream
->
size
-
offset
)
*
data
->
maxFrames
=
FRAMES_CUSHION
;
8
.
0
)
/
(
data
->
frame
).
header
.
bitrate
;
data
->
totalTime
=
0
;
data
->
maxFrames
=
data
->
totalTime
/
frameTime
+
FRAMES_CUSHION
;
}
else
{
data
->
maxFrames
=
FRAMES_CUSHION
;
data
->
totalTime
=
0
;
}
}
}
/*
/*
* if an xing tag exists, use that!
* if an xing tag exists, use that!
*/
*/
...
...
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