Fix up warnings about explicit base initializers in copy constructors
[melted] / mlt++ / src / MltPlaylist.cpp
index adace64..1424594 100644 (file)
@@ -44,7 +44,7 @@ ClipInfo::ClipInfo( mlt_playlist_clip_info *info ) :
        producer( new Producer( info->producer ) ),
        cut( new Producer( info->cut ) ),
        start( info->start ),
-       resource( strdup( info->resource ) ),
+       resource( info->resource? strdup( info->resource )  : 0 ),
        frame_in( info->frame_in ),
        frame_out( info->frame_out ),
        frame_count( info->frame_count ),
@@ -96,6 +96,7 @@ Playlist::Playlist( Service &producer ) :
 }
 
 Playlist::Playlist( Playlist &playlist ) :
+       Mlt::Producer( playlist ),
        instance( playlist.get_playlist( ) )
 {
        inc_ref( );
@@ -160,13 +161,19 @@ Producer *Playlist::current( )
 ClipInfo *Playlist::clip_info( int index, ClipInfo *info )
 {
        mlt_playlist_clip_info clip_info;
-       mlt_playlist_get_clip_info( get_playlist( ), &clip_info, index );
+       if ( mlt_playlist_get_clip_info( get_playlist( ), &clip_info, index ) )
+               return NULL;
        if ( info == NULL )
                return new ClipInfo( &clip_info );
        info->update( &clip_info );
        return info;
 }
 
+void Playlist::delete_clip_info( ClipInfo *info )
+{
+       delete info;
+}
+
 int Playlist::insert( Producer &producer, int where, int in, int out )
 {
        return mlt_playlist_insert( get_playlist( ), producer.get_producer( ), where, in, out );
@@ -192,6 +199,11 @@ int Playlist::split( int clip, int position )
        return mlt_playlist_split( get_playlist( ), clip, position );
 }
 
+int Playlist::split_at( int position, bool left )
+{
+       return mlt_playlist_split_at( get_playlist( ), position, left );
+}
+
 int Playlist::join( int clip, int count, int merge )
 {
        return mlt_playlist_join( get_playlist( ), clip, count, merge );
@@ -236,7 +248,12 @@ bool Playlist::is_mix( int clip )
 
 bool Playlist::is_blank( int clip )
 {
-       return mlt_playlist_is_blank( get_playlist( ), clip );
+       return mlt_playlist_is_blank( get_playlist( ), clip ) != 0;
+}
+
+bool Playlist::is_blank_at( int position )
+{
+       return mlt_playlist_is_blank_at( get_playlist( ), position ) != 0;
 }
 
 Producer *Playlist::replace_with_blank( int clip )