lib: make can_seek_ns_from_origin logic use `can_seek_forward` property of iterator
[babeltrace.git] / src / plugins / ctf / fs-src / fs.c
index c3b8a2ed9a0f6ee6acbc95e5cda19078d05771c2..08d2acfb9581286724199b56c430a6a40c58bd63 100644 (file)
@@ -293,12 +293,20 @@ bt_component_class_message_iterator_initialize_method_status ctf_fs_iterator_ini
                goto error;
        }
 
+       /*
+        * This iterator can seek forward if its stream class has a default
+        * clock class.
+        */
+       if (msg_iter_data->ds_file_group->sc->default_clock_class) {
+               bt_self_message_iterator_configuration_set_can_seek_forward(
+                       config, true);
+       }
+
        bt_self_message_iterator_set_data(self_msg_iter,
                msg_iter_data);
        if (ret != BT_COMPONENT_CLASS_MESSAGE_ITERATOR_INITIALIZE_METHOD_STATUS_OK) {
                goto error;
        }
-
        msg_iter_data = NULL;
        goto end;
 
This page took 0.022871 seconds and 4 git commands to generate.