[vlc-commits] chromecast: simplify the sout cleaning
Steve Lhomme
git at videolan.org
Fri Mar 25 09:06:38 CET 2016
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Fri Mar 18 17:38:21 2016 +0100| [57abfc977b55a036425df67950a42663756121fc] | committer: Jean-Baptiste Kempf
chromecast: simplify the sout cleaning
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=57abfc977b55a036425df67950a42663756121fc
---
modules/stream_out/chromecast/cast.cpp | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index c97511a..cfe4032 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -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;
}
More information about the vlc-commits
mailing list