Commit 57abfc97 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

chromecast: simplify the sout cleaning

parent 876534b7
......@@ -63,7 +63,6 @@ struct sout_stream_sys_t
*****************************************************************************/
static int Open(vlc_object_t *);
static void Close(vlc_object_t *);
static void Clean(sout_stream_t *p_stream);
static const char *const ppsz_sout_options[] = {
"http-port", "mux", "mime", NULL
......@@ -145,7 +144,7 @@ static int Control(sout_stream_t *p_stream, int i_query, va_list args)
static int Open(vlc_object_t *p_this)
{
sout_stream_t *p_stream = reinterpret_cast<sout_stream_t*>(p_this);
sout_stream_sys_t *p_sys;
sout_stream_sys_t *p_sys = NULL;
intf_sys_t *p_intf = NULL;
char *psz_mux = NULL;
sout_stream_t *p_sout = NULL;
......@@ -188,7 +187,7 @@ static int Open(vlc_object_t *p_this)
error:
sout_StreamChainDelete(p_sout, p_sout);
free(psz_mux);
Clean(p_stream);
delete p_sys;
return VLC_EGENERIC;
}
......@@ -199,15 +198,6 @@ static void Close(vlc_object_t *p_this)
{
sout_stream_t *p_stream = reinterpret_cast<sout_stream_t*>(p_this);
Clean(p_stream);
}
/**
* @brief Clean and release the variables in a sout_stream_sys_t structure
*/
static void Clean(sout_stream_t *p_stream)
{
delete p_stream->p_sys;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment