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
cf94008b
Commit
cf94008b
authored
Feb 09, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shout: removed shout_data.tag_to_send
When shout_data.tag!=NULL, there is a "tag to send". The tag_to_send flag is redundant.
parent
044f2561
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
shout_plugin.c
src/output/shout_plugin.c
+6
-8
shout_plugin.h
src/output/shout_plugin.h
+0
-1
No files found.
src/output/shout_plugin.c
View file @
cf94008b
...
...
@@ -58,7 +58,6 @@ static struct shout_data *new_shout_data(void)
ret
->
shout_meta
=
shout_metadata_new
();
ret
->
opened
=
0
;
ret
->
tag
=
NULL
;
ret
->
tag_to_send
=
0
;
ret
->
bitrate
=
-
1
;
ret
->
quality
=
-
2
.
0
;
ret
->
timeout
=
DEFAULT_CONN_TIMEOUT
;
...
...
@@ -428,7 +427,6 @@ static int open_shout_conn(void *data)
write_page
(
sd
);
sd
->
opened
=
true
;
sd
->
tag_to_send
=
1
;
sd
->
conn_attempts
=
0
;
return
0
;
...
...
@@ -455,7 +453,9 @@ static void send_metadata(struct shout_data * sd)
static
const
int
size
=
1024
;
char
song
[
size
];
if
(
!
sd
->
opened
||
!
sd
->
tag
)
assert
(
sd
->
tag
!=
NULL
);
if
(
!
sd
->
opened
)
return
;
if
(
sd
->
encoder
->
send_metadata_func
(
sd
,
song
,
size
))
{
...
...
@@ -463,11 +463,11 @@ static void send_metadata(struct shout_data * sd)
if
(
SHOUTERR_SUCCESS
!=
shout_set_metadata
(
sd
->
shout_conn
,
sd
->
shout_meta
))
{
g_warning
(
"error setting shout metadata
\n
"
);
return
;
}
}
sd
->
tag_to_send
=
0
;
tag_free
(
sd
->
tag
);
sd
->
tag
=
NULL
;
}
static
bool
...
...
@@ -481,7 +481,7 @@ my_shout_play(void *data, const char *chunk, size_t size)
timer_add
(
sd
->
timer
,
size
);
if
(
sd
->
opened
&&
sd
->
tag
_to_send
)
if
(
sd
->
opened
&&
sd
->
tag
!=
NULL
)
send_metadata
(
sd
);
if
(
!
sd
->
opened
)
{
...
...
@@ -519,13 +519,11 @@ static void my_shout_set_tag(void *data,
if
(
sd
->
tag
)
tag_free
(
sd
->
tag
);
sd
->
tag
=
NULL
;
sd
->
tag_to_send
=
0
;
if
(
!
tag
)
return
;
sd
->
tag
=
tag_dup
(
tag
);
sd
->
tag_to_send
=
1
;
}
const
struct
audio_output_plugin
shoutPlugin
=
{
...
...
src/output/shout_plugin.h
View file @
cf94008b
...
...
@@ -71,7 +71,6 @@ struct shout_data {
bool
opened
;
struct
tag
*
tag
;
int
tag_to_send
;
int
timeout
;
int
conn_attempts
;
...
...
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