Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
d8e9eb38
Commit
d8e9eb38
authored
Jan 01, 2003
by
Michael Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
indentation fixes, and a small fix for tracking bytes sent.
svn path=/trunk/icecast/; revision=4197
parent
ba5e9037
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
src/format_mp3.c
src/format_mp3.c
+10
-6
No files found.
src/format_mp3.c
View file @
d8e9eb38
...
...
@@ -93,13 +93,15 @@ static int send_metadata(client_t *client, mp3_client_data *client_state,
return
0
;
}
fullmetadata_size
=
strlen
(
source_state
->
metadata
)
+
strlen
(
"StreamTitle='';StreamUrl=''"
)
+
1
;
fullmetadata_size
=
strlen
(
source_state
->
metadata
)
+
strlen
(
"StreamTitle='';StreamUrl=''"
)
+
1
;
fullmetadata
=
alloca
(
fullmetadata_size
);
memset
(
fullmetadata
,
0
,
fullmetadata_size
);
sprintf
(
fullmetadata
,
"StreamTitle='%s';StreamUrl=''"
,
source_state
->
metadata
);
sprintf
(
fullmetadata
,
"StreamTitle='%s';StreamUrl=''"
,
source_state
->
metadata
);
source_age
=
source_state
->
metadata_age
;
send_metadata
=
source_age
!=
client_state
->
metadata_age
;
...
...
@@ -117,8 +119,8 @@ static int send_metadata(client_t *client, mp3_client_data *client_state,
buf
[
0
]
=
len_byte
;
if
(
len
>
1
)
{
strncpy
(
buf
+
1
,
fullmetadata
+
client_state
->
metadata_offset
,
len
-
2
);
DEBUG1
(
"Sending metadata (%s)"
,
buf
+
1
);
strncpy
(
buf
+
1
,
fullmetadata
+
client_state
->
metadata_offset
,
len
-
2
);
DEBUG1
(
"Sending metadata (%s)"
,
buf
+
1
);
}
thread_mutex_unlock
(
&
(
source_state
->
lock
));
...
...
@@ -160,8 +162,10 @@ static int format_mp3_write_buf_to_client(format_plugin_t *self,
}
else
{
ret
=
send_metadata
(
client
,
state
,
self
->
_state
);
ret
=
0
;
}
if
(
ret
>
0
)
client
->
con
->
sent_bytes
+=
ret
;
ret
=
0
;
}
}
else
{
...
...
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