src/main/java/org/jcodec/containers/mp4/QTTimeUtil.java
public static long getEditedDuration(TrakBox track) {
        List<Edit> edits = track.getEdits();
        if (edits == null)
            return track.getDuration();

        long duration = 0;
        for (Edit edit : edits) {
            duration += edit.getDuration();
        }
        return duration;
    }
public static long getEditedDuration(TrakBox track) {
        List<Edit> edits = track.getEdits();
        if (edits == null)
            return track.getDuration();

        long duration = 0;
        for (Edit edit : edits) {
            duration += edit.getDuration();
        }
        return duration;
    }
public static long getEditedDuration ( TrakBox track ) { List < Edit > edits = track . getEdits ( ) ; if ( edits == null ) return track . getDuration ( ) ; long duration = 0 ; for ( Edit edit : edits ) { duration += edit . getDuration ( ) ; } return duration ; }
Calculates track duration considering edits

@param track
@return
Calculates track duration considering edits