[vlc-devel] [PATCH] Properly attach stream_Demux / fixes :demuxdump-file with RTP

Marian Ďurkovič md at bts.sk
Mon Sep 7 07:51:55 CEST 2009


>From 17eb576585ef2db6ec4a732840ad27b3e78ce162 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Marian=20=C4=8Eurkovi=C4=8D?= <md at bts.sk>
Date: Mon, 7 Sep 2009 07:47:34 +0200
Subject: [PATCH] Properly attach stream_Demux object to its parent.
 Now :demuxdump-file=foo works correctly with RTP input.

---
 src/input/stream_demux.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/input/stream_demux.c b/src/input/stream_demux.c
index 777091c..f402051 100644
--- a/src/input/stream_demux.c
+++ b/src/input/stream_demux.c
@@ -93,9 +93,12 @@ stream_t *stream_DemuxNew( demux_t *p_demux, const char *psz_demux, es_out_t *ou
         return NULL;
     }
 
+    vlc_object_attach( s, p_obj );
+
     if( vlc_thread_create( s, "stream out", DStreamThread,
                            VLC_THREAD_PRIORITY_INPUT ) )
     {
+        vlc_object_detach( s );
         stream_CommonDelete( s );
         free( p_sys->psz_name );
         free( p_sys );
@@ -132,7 +135,7 @@ static void DStreamDelete( stream_t *s )
     block_FifoRelease( p_sys->p_fifo );
     free( p_sys->psz_name );
     free( p_sys );
-
+    vlc_object_detach( s );
     stream_CommonDelete( s );
 }
 
-- 
1.5.3.3




More information about the vlc-devel mailing list