- start = all ? 0 :
- edl->local_session->get_selectionstart();
- end = all ? edl->tracks->total_length() :
- edl->local_session->get_selectionend();
-
+ double start = all ? 0 :
+ src->inpoint_valid() ? src->get_inpoint() :
+ src->outpoint_valid() ? 0 : src->get_selectionstart();
+ double end = all ? edl->tracks->total_length() :
+ src->outpoint_valid() ? src->get_outpoint() :
+ src->inpoint_valid() ? edl->tracks->total_length() :
+ src->get_selectionend();