pub fn initial_empty_edit_to_dwell(&mut self) {
        let edit = match self.edit_list_mut() {
            Some(elst) => {
                if elst.entries[0].media_time >= 0 {
                    return;
                }
                elst.entries.vec.remove(0)
            },
            None => return,
        };

        let media_timescale = self.media().media_header().timescale as u64;
        let segment_duration = edit.segment_duration as u64;
        let offset = (media_timescale * segment_duration / self.movie_timescale as u64) as u32;

        let stts = self
            .media_mut()
            .media_info_mut()
            .sample_table_mut()
            .time_to_sample_mut();

        let entries = &mut stts.entries;
        if entries.len() == 0 {
            return;
        }

        if entries[0].count > 1 {
            let entry = entries[0].clone();
            entries.vec.insert(0, entry);
            entries[0].count = 1;
            entries[1].count -= 1;
        }

        entries[0].delta += offset;
    }
/// See if the track has an edit list. If so, check if there is an initial
/// empty edit. If so, delete that edit, and extend the duration of the
/// first sample with the length of the empty edit.
See if the track has an edit list. If so, check if there is an initial
empty edit. If so, delete that edit, and extend the duration of the
first sample with the length of the empty edit.
See if the track has an edit list . If so check if there is an initial empty edit . If so delete that edit and extend the duration of the first sample with the length of the empty edit .
pub fn initial_empty_edit_to_dwell(&mut self) {
        let edit = match self.edit_list_mut() {
            Some(elst) => {
                if elst.entries[0].media_time >= 0 {
                    return;
                }
                elst.entries.vec.remove(0)
            },
            None => return,
        };
        let media_timescale = self.media().media_header().timescale as u64;
        let segment_duration = edit.segment_duration as u64;
        let offset = (media_timescale * segment_duration / self.movie_timescale as u64) as u32;
        let stts = self
            .media_mut()
            .media_info_mut()
            .sample_table_mut()
            .time_to_sample_mut();
        let entries = &mut stts.entries;
        if entries.len() == 0 {
            return;
        }
        if entries[0].count > 1 {
            let entry = entries[0].clone();
            entries.vec.insert(0, entry);
            entries[0].count = 1;
            entries[1].count -= 1;
        }
        entries[0].delta += offset;
    }
pub fn initial_empty_edit_to_dwell ( & mut self ) { let edit = match self . edit_list_mut ( ) { Some ( elst ) => { if elst . entries [ 0 ] . media_time >= 0 { return ; } elst . entries . vec . remove ( 0 ) } , None => return , } ; let media_timescale = self . media ( ) . media_header ( ) . timescale as u64 ; let segment_duration = edit . segment_duration as u64 ; let offset = ( media_timescale * segment_duration / self . movie_timescale as u64 ) as u32 ; let stts = self . media_mut ( ) . media_info_mut ( ) . sample_table_mut ( ) . time_to_sample_mut ( ) ; let entries = & mut stts . entries ; if entries . len ( ) == 0 { return ; } if entries [ 0 ] . count > 1 { let entry = entries [ 0 ] . clone ( ) ; entries . vec . insert ( 0 , entry ) ; entries [ 0 ] . count = 1 ; entries [ 1 ] . count -= 1 ; } entries [ 0 ] . delta += offset ; }
See if the track has an edit list.
See if the track has an edit list .
&mut self
&mut self