[vlc-devel] [PATCH] sout: we don't modify the chain string
Steve Lhomme
robux4 at videolabs.io
Wed Oct 28 10:09:30 CET 2015
without the const passing a std::string.c_str() in C++ fails
---
include/vlc_sout.h | 2 +-
src/missing.c | 2 +-
src/stream_output/stream_output.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/vlc_sout.h b/include/vlc_sout.h
index e4cc0e8..bc91349 100644
--- a/include/vlc_sout.h
+++ b/include/vlc_sout.h
@@ -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 )
diff --git a/src/missing.c b/src/missing.c
index a4897ee..24218f3 100644
--- a/src/missing.c
+++ b/src/missing.c
@@ -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)
{
diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index b03bb84..d09719d 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -807,7 +807,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)
--
2.6.2
More information about the vlc-devel
mailing list