- BT_ASSERT_PRE((with_cs && stream_class->default_clock_class) ||
- (!with_cs && !stream_class->default_clock_class),
+
+ if (is_beginning) {
+ packet_has_default_clock_snapshot =
+ stream_class->packets_have_default_beginning_clock_snapshot;
+ } else {
+ packet_has_default_clock_snapshot =
+ stream_class->packets_have_default_end_clock_snapshot;
+ }
+
+ /*
+ * `packet_has_default_clock_snapshot` implies that the stream
+ * class has a default clock class (precondition).
+ */
+ BT_ASSERT_PRE((with_cs && packet_has_default_clock_snapshot) ||
+ (!with_cs && !packet_has_default_clock_snapshot),