- if (bt_stream_class_borrow_default_clock_class_const(ir_sc)) {
- if (!bt_stream_class_packets_have_default_beginning_clock_snapshot(
- ir_sc)) {
- BT_LOGE("Unsupported stream: packets have "
- "no beginning clock snapshot: "
- "stream-addr=%p, "
- "stream-id=%" PRIu64 ", "
- "stream-name=\"%s\"",
- ir_stream, bt_stream_get_id(ir_stream),
- bt_stream_get_name(ir_stream));
- status = BT_SELF_MESSAGE_ITERATOR_STATUS_ERROR;
- goto end;
- }
-
- if (!bt_stream_class_packets_have_default_end_clock_snapshot(
- ir_sc)) {
- BT_LOGE("Unsupported stream: packets have "
- "no end clock snapshot: "
- "stream-addr=%p, "
- "stream-id=%" PRIu64 ", "
- "stream-name=\"%s\"",
- ir_stream, bt_stream_get_id(ir_stream),
- bt_stream_get_name(ir_stream));
- status = BT_SELF_MESSAGE_ITERATOR_STATUS_ERROR;
- goto end;
- }
-
- if (!fs_sink->ignore_discarded_events &&
- bt_stream_class_supports_discarded_events(ir_sc) &&
- !bt_stream_class_discarded_events_have_default_clock_snapshots(ir_sc)) {
- BT_LOGE("Unsupported stream: discarded events "
- "have no clock snapshots: "
- "stream-addr=%p, "
- "stream-id=%" PRIu64 ", "
- "stream-name=\"%s\"",
- ir_stream, bt_stream_get_id(ir_stream),
- bt_stream_get_name(ir_stream));
- status = BT_SELF_MESSAGE_ITERATOR_STATUS_ERROR;
- goto end;
- }
+ if (!fs_sink->ignore_discarded_events &&
+ bt_stream_class_discarded_events_have_default_clock_snapshots(ir_sc) &&
+ !packets_have_beginning_end_cs) {
+ BT_LOGE("Unsupported stream: discarded events have "
+ "default clock snapshots, but packets have no "
+ "beginning and/or end default clock snapshots: "
+ "stream-addr=%p, "
+ "stream-id=%" PRIu64 ", "
+ "stream-name=\"%s\"",
+ ir_stream, bt_stream_get_id(ir_stream),
+ bt_stream_get_name(ir_stream));
+ status = BT_SELF_MESSAGE_ITERATOR_STATUS_ERROR;
+ goto end;
+ }