[vlc-devel] [vlc-commits] se/archive: use readdir_helper

Thomas Guillem thomas at gllm.fr
Wed Oct 11 18:07:11 CEST 2017


OK, got it, thanks for the report.

On Wed, Oct 11, 2017, at 17:45, Thomas Guillem wrote:
> Is it possible to have a gdb backtrace ?
> 
> On Tue, Oct 10, 2017, at 16:24, KO Myung-Hun wrote:
> > Hi/2.
> > 
> > This commit causes skins2 interface to crash due to SIGSEGV.
> > 
> > Thomas Guillem wrote:
> > > vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Sep 20 10:39:35 2017 +0200| [a913906b1327e3a4705c8e85d9989222bf5f7e1a] | committer: Thomas Guillem
> > > 
> > > se/archive: use readdir_helper
> > > 
> > >> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a913906b1327e3a4705c8e85d9989222bf5f7e1a
> > > ---
> > > 
> > >  modules/stream_extractor/archive.c | 26 +++++++++++---------------
> > >  1 file changed, 11 insertions(+), 15 deletions(-)
> > > 
> > > diff --git a/modules/stream_extractor/archive.c b/modules/stream_extractor/archive.c
> > > index b2bf4f9d47..9796d0b7bd 100644
> > > --- a/modules/stream_extractor/archive.c
> > > +++ b/modules/stream_extractor/archive.c
> > > @@ -505,6 +505,8 @@ static int ReadDir( stream_directory_t* p_directory, input_item_node_t* p_node )
> > >      private_sys_t* p_sys = p_directory->p_sys;
> > >      libarchive_t* p_arc = p_sys->p_archive;
> > >  
> > > +    struct vlc_readdir_helper rdh;
> > > +    vlc_readdir_helper_init( &rdh, p_directory, p_node);
> > >      struct archive_entry* entry;
> > >      int archive_status;
> > >  
> > > @@ -517,28 +519,22 @@ static int ReadDir( stream_directory_t* p_directory, input_item_node_t* p_node )
> > >          char*       mrl  = vlc_stream_extractor_CreateMRL( p_directory, path );
> > >  
> > >          if( unlikely( !mrl ) )
> > > -            return VLC_ENOMEM;
> > > -
> > > -        input_item_t* p_item = input_item_New( mrl, path );
> > > +            break;
> > >  
> > > +        if( vlc_readdir_helper_additem( &rdh, mrl, path, NULL, ITEM_TYPE_FILE,
> > > +                                        ITEM_LOCAL ) )
> > > +        {
> > > +            free( mrl );
> > > +            break;
> > > +        }
> > >          free( mrl );
> > >  
> > > -        if( unlikely( !p_item ) )
> > > -            return VLC_ENOMEM;
> > > -
> > > -
> > > -        input_item_CopyOptions( p_node->p_item, p_item );
> > > -        input_item_node_AppendItem( p_node, p_item );
> > > -        input_item_Release( p_item );
> > > -
> > >          if( archive_read_data_skip( p_arc ) )
> > >              break;
> > >      }
> > >  
> > > -    if( archive_status != ARCHIVE_EOF )
> > > -        return VLC_EGENERIC;
> > > -
> > > -    return VLC_SUCCESS;
> > > +    vlc_readdir_helper_finish( &rdh, archive_status == ARCHIVE_EOF );
> > > +    return archive_status == ARCHIVE_EOF ? VLC_SUCCESS : VLC_EGENERIC;
> > >  }
> > >  
> > >  static ssize_t Read( stream_extractor_t *p_extractor, void* p_data, size_t i_size )
> > > 
> > > _______________________________________________
> > > vlc-commits mailing list
> > > vlc-commits at videolan.org
> > > https://mailman.videolan.org/listinfo/vlc-commits
> > 
> > -- 
> > KO Myung-Hun
> > 
> > Using Mozilla SeaMonkey 2.7.2
> > Under OS/2 Warp 4 for Korean with FixPak #15
> > In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM
> > 
> > Korean OS/2 User Community : http://www.os2.kr/
> > 
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list