Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Ezstream
Commits
5287bbdd
Commit
5287bbdd
authored
Jan 23, 2018
by
Moritz Grimm
Browse files
Support pass-through encoder (again)
parent
b7d12699
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ezstream.c
View file @
5287bbdd
...
...
@@ -179,8 +179,6 @@ _build_reencode_cmd(const char *extension, const char *filename,
dicts
[
4
].
from
=
PLACEHOLDER_METADATA
;
dicts
[
4
].
to
=
custom_songinfo
;
dec_str
=
util_expand_words
(
cfg_decoder_get_program
(
decoder
),
dicts
);
if
(
!
cfg_get_metadata_program
()
&&
strstr
(
cfg_encoder_get_program
(
encoder
),
PLACEHOLDER_TITLE
)
!=
NULL
)
{
...
...
@@ -188,13 +186,21 @@ _build_reencode_cmd(const char *extension, const char *filename,
dicts
[
4
].
to
=
custom_songinfo
=
xstrdup
(
""
);
}
enc_str
=
util_expand_words
(
cfg_encoder_get_program
(
encoder
),
dicts
);
cmd_str_size
=
strlen
(
dec_str
)
+
strlen
(
" | "
)
+
strlen
(
enc_str
)
+
1
;
cmd_str
=
xcalloc
(
cmd_str_size
,
sizeof
(
char
));
snprintf
(
cmd_str
,
cmd_str_size
,
"%s | %s"
,
dec_str
,
enc_str
);
xfree
(
dec_str
);
xfree
(
enc_str
);
dec_str
=
util_expand_words
(
cfg_decoder_get_program
(
decoder
),
dicts
);
cmd_str_size
=
strlen
(
dec_str
)
+
1
;
if
(
cfg_encoder_get_program
(
encoder
))
{
enc_str
=
util_expand_words
(
cfg_encoder_get_program
(
encoder
),
dicts
);
cmd_str_size
+=
strlen
(
" | "
)
+
strlen
(
enc_str
);
cmd_str
=
xcalloc
(
cmd_str_size
,
sizeof
(
char
));
snprintf
(
cmd_str
,
cmd_str_size
,
"%s | %s"
,
dec_str
,
enc_str
);
xfree
(
enc_str
);
xfree
(
dec_str
);
}
else
{
cmd_str
=
xcalloc
(
cmd_str_size
,
sizeof
(
char
));
snprintf
(
cmd_str
,
cmd_str_size
,
"%s"
,
dec_str
);
xfree
(
dec_str
);
}
xfree
(
artist
);
xfree
(
album
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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