- if (bt_stream_class_borrow_default_clock_class_const(stream_class)) {
- switch (bt_message_get_type(msg)) {
- case BT_MESSAGE_TYPE_DISCARDED_EVENTS:
- bt_message_discarded_events_borrow_default_beginning_clock_snapshot_const(
- msg, &begin);
- bt_message_discarded_events_borrow_default_end_clock_snapshot_const(
- msg, &end);
- break;
- case BT_MESSAGE_TYPE_DISCARDED_PACKETS:
- bt_message_discarded_packets_borrow_default_beginning_clock_snapshot_const(
- msg, &begin);
- bt_message_discarded_packets_borrow_default_end_clock_snapshot_const(
- msg, &end);
- break;
- default:
- abort();
+ switch (bt_message_get_type(msg)) {
+ case BT_MESSAGE_TYPE_DISCARDED_EVENTS:
+ if (bt_stream_class_discarded_events_have_default_clock_snapshots(
+ stream_class)) {
+ begin = bt_message_discarded_events_borrow_beginning_default_clock_snapshot_const(
+ msg);
+ end = bt_message_discarded_events_borrow_end_default_clock_snapshot_const(
+ msg);
+ }
+
+ break;
+ case BT_MESSAGE_TYPE_DISCARDED_PACKETS:
+ if (bt_stream_class_discarded_packets_have_default_clock_snapshots(
+ stream_class)) {
+ begin = bt_message_discarded_packets_borrow_beginning_default_clock_snapshot_const(
+ msg);
+ end = bt_message_discarded_packets_borrow_end_default_clock_snapshot_const(
+ msg);