From 36ea4f471a9e146a0772514cc49c71ef98aadec4 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Thu, 23 Jun 2005 15:14:36 +0000 Subject: [PATCH] * backport of [11500] [11501] and [11502] --- modules/demux/livedotcom.cpp | 4 +++- modules/demux/mkv.cpp | 16 ++++++++++++---- modules/gui/macosx/playlist.m | 9 ++++++++- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/modules/demux/livedotcom.cpp b/modules/demux/livedotcom.cpp index d1dae7bc4c..e7fbfd8418 100644 --- a/modules/demux/livedotcom.cpp +++ b/modules/demux/livedotcom.cpp @@ -769,8 +769,10 @@ static int Demux( demux_t *p_demux ) if( p_sys->b_multicast && p_sys->b_no_data && p_sys->i_no_data_ti > 120 ) { + /* FIXME Make this configurable msg_Err( p_demux, "no multicast data received in 36s, aborting" ); return 0; + */ } else if( !p_sys->b_multicast && p_sys->b_no_data && p_sys->i_no_data_ti > 3 ) { @@ -792,7 +794,7 @@ static int Demux( demux_t *p_demux ) return 0; } } - else if( p_sys->i_no_data_ti > 10 ) + else if( !p_sys->b_multicast && p_sys->b_no_data&& p_sys->i_no_data_ti > 10 ) { /* EOF ? */ msg_Warn( p_demux, "no data received in 3s, eof ?" ); diff --git a/modules/demux/mkv.cpp b/modules/demux/mkv.cpp index 0a0df378ea..0ffd88c6c7 100644 --- a/modules/demux/mkv.cpp +++ b/modules/demux/mkv.cpp @@ -492,9 +492,16 @@ class vlc_stream_io_callback: public IOCallback private: stream_t *s; vlc_bool_t mb_eof; + vlc_bool_t b_owner; public: - vlc_stream_io_callback( stream_t * ); + vlc_stream_io_callback( stream_t *, vlc_bool_t ); + + virtual ~vlc_stream_io_callback() + { + if( b_owner ) + stream_Delete( s ); + } virtual uint32 read ( void *p_buffer, size_t i_size); virtual void setFilePointer ( int64_t i_offset, seek_mode mode = seek_beginning ); @@ -1392,7 +1399,7 @@ static int Open( vlc_object_t * p_this ) p_demux->pf_control = Control; p_demux->p_sys = p_sys = new demux_sys_t( *p_demux ); - p_io_callback = new vlc_stream_io_callback( p_demux->s ); + p_io_callback = new vlc_stream_io_callback( p_demux->s, VLC_FALSE ); p_io_stream = new EbmlStream( *p_io_callback ); if( p_io_stream == NULL ) @@ -1469,7 +1476,7 @@ static int Open( vlc_object_t * p_this ) #endif { // test wether this file belongs to our family - vlc_stream_io_callback *p_file_io = new vlc_stream_io_callback( stream_UrlNew( p_demux, s_filename.c_str())); + vlc_stream_io_callback *p_file_io = new vlc_stream_io_callback( stream_UrlNew( p_demux, s_filename.c_str()), VLC_TRUE ); EbmlStream *p_estream = new EbmlStream(*p_file_io); p_stream = p_sys->AnalyseAllSegmentsFound( p_estream ); @@ -3224,9 +3231,10 @@ static int Demux( demux_t *p_demux) /***************************************************************************** * Stream managment *****************************************************************************/ -vlc_stream_io_callback::vlc_stream_io_callback( stream_t *s_ ) +vlc_stream_io_callback::vlc_stream_io_callback( stream_t *s_, vlc_bool_t b_owner_ ) { s = s_; + b_owner = b_owner_; mb_eof = VLC_FALSE; } diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index b3b6fccbc2..40a5167861 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -925,7 +925,14 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ } if( o_result != NULL ) { - for( i = 1 ; i < [o_result count] - 1 ; i++ ) + int i_start; + if( [[o_result objectAtIndex: 0] pointerValue] == + p_playlist->p_general ) + i_start = 1; + else + i_start = 0; + + for( i = i_start ; i < [o_result count] - 1 ; i++ ) { [o_outline_view expandItem: [o_outline_dict objectForKey: [NSString stringWithFormat: @"%p", -- 2.39.2