[vlc-commits] demux: fix missing private destroyer for demux filters
Steve Lhomme
git at videolan.org
Fri Jun 24 18:37:03 CEST 2016
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Jun 23 13:54:25 2016 +0200| [cdb242d850df58cfa6109a8fe0ade26dbccafce6] | committer: Jean-Baptiste Kempf
demux: fix missing private destroyer for demux filters
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cdb242d850df58cfa6109a8fe0ade26dbccafce6
---
src/input/demux.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/input/demux.c b/src/input/demux.c
index 448d2ea..c64024e 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -105,6 +105,12 @@ static void demux_DestroyAccessDemux(demux_t *demux)
(void) demux;
}
+static void demux_DestroyDemuxFilter(demux_t *demux)
+{
+ assert(demux->p_next != NULL);
+ (void) demux;
+}
+
/*****************************************************************************
* demux_NewAdvanced:
* if s is NULL then load a access_demux
@@ -706,10 +712,12 @@ int demux_GetSeekpoint( demux_t *p_demux )
static demux_t *demux_FilterNew( demux_t *p_next, const char *p_name )
{
- demux_t *p_demux = vlc_custom_create( p_next, sizeof( demux_t ), "demux_filter" );
- if( unlikely(p_demux == NULL) )
+ demux_priv_t *priv = vlc_custom_create(p_next, sizeof (*priv), "demux_filter");
+ if (unlikely(priv == NULL))
return NULL;
+ demux_t *p_demux = &priv->demux;
+
p_demux->p_next = p_next;
p_demux->s = NULL;
p_demux->p_input = NULL;
@@ -719,6 +727,7 @@ static demux_t *demux_FilterNew( demux_t *p_next, const char *p_name )
p_demux->psz_location = NULL;
p_demux->psz_file = NULL;
p_demux->out = NULL;
+ priv->destroy = demux_DestroyDemuxFilter;
p_demux->p_module =
module_need( p_demux, "demux_filter", p_name, p_name != NULL );
More information about the vlc-commits
mailing list