Skip to content

Commit

Permalink
sout: we don't modify the chain string
Browse files Browse the repository at this point in the history
without the const passing a std::string.c_str() in C++ fails

Signed-off-by: Jean-Baptiste Kempf <[email protected]>
  • Loading branch information
robUx4 authored and jbkempf committed Nov 26, 2015
1 parent 0161521 commit d03be6c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/vlc_sout.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ struct sout_stream_t

VLC_API void sout_StreamChainDelete(sout_stream_t *p_first, sout_stream_t *p_last );
VLC_API sout_stream_t *sout_StreamChainNew(sout_instance_t *p_sout,
char *psz_chain, sout_stream_t *p_next, sout_stream_t **p_last) VLC_USED;
const char *psz_chain, sout_stream_t *p_next, sout_stream_t **p_last) VLC_USED;

static inline sout_stream_id_sys_t *sout_StreamIdAdd( sout_stream_t *s,
const es_format_t *fmt )
Expand Down
2 changes: 1 addition & 1 deletion src/missing.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ void sout_StreamChainDelete (sout_stream_t *p_first, sout_stream_t *p_last)
vlc_assert_unreachable ();
}

sout_stream_t *sout_StreamChainNew (sout_instance_t *p_sout, char *psz_chain,
sout_stream_t *sout_StreamChainNew (sout_instance_t *p_sout, const char *psz_chain,
sout_stream_t *p_next,
sout_stream_t **pp_last)
{
Expand Down
6 changes: 3 additions & 3 deletions src/stream_output/stream_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ static sout_stream_t *sout_StreamNew( sout_instance_t *p_sout, char *psz_name,
*
* Returns a pointer to the first module.
*/
sout_stream_t *sout_StreamChainNew(sout_instance_t *p_sout, char *psz_chain,
sout_stream_t *sout_StreamChainNew(sout_instance_t *p_sout, const char *psz_chain,
sout_stream_t *p_next, sout_stream_t **pp_last)
{
if(!psz_chain || !*psz_chain)
Expand All @@ -832,9 +832,9 @@ sout_stream_t *sout_StreamChainNew(sout_instance_t *p_sout, char *psz_chain,
{
config_chain_t *p_cfg;
char *psz_name;
psz_chain = config_ChainCreate( &psz_name, &p_cfg, psz_parser );
char *psz_rest_chain = config_ChainCreate( &psz_name, &p_cfg, psz_parser );
free( psz_parser );
psz_parser = psz_chain;
psz_parser = psz_rest_chain;

vlc_array_append(&cfg, p_cfg);
vlc_array_append(&name, psz_name);
Expand Down

0 comments on commit d03be6c

Please sign in to comment.