mbl = mbl + xid * xid;
}
conn->local_to_remote_time_gradient_sample_count = sample_count;
- conn->local_to_remote_time_gradient = (1.0 * mtl) / mbl;
+ if (mbl)
+ conn->local_to_remote_time_gradient = (1.0 * mtl) / mbl;
+ else {
+ conn->local_to_remote_time_gradient = 1.0;
+ debug(1,"rtp_timing_receiver: mbl is 0");
+ }
} else {
conn->local_to_remote_time_gradient = 1.0;
}
if ((local_frames == 0) || (local_time == 0) || (use_nominal_rate)) {
result = 1;
} else {
- double calculated_frame_rate = ((1.0 * local_frames) / local_time) * one_fp;
- if (((calculated_frame_rate / conn->input_rate) > 1.002) ||
+ double calculated_frame_rate = conn->input_rate;
+ if (local_time)
+ calculated_frame_rate = ((1.0 * local_frames) / local_time) * one_fp;
+ else
+ debug(1,"sanitised_source_rate_information: local_time is zero");
+ if ((local_time == 0) || ((calculated_frame_rate / conn->input_rate) > 1.002) ||
((calculated_frame_rate / conn->input_rate) < 0.998)) {
debug(3, "input frame rate out of bounds at %.2f fps.", calculated_frame_rate);
result = 1;
// now, convert the remote time interval into frames using the frame rate we have observed or
// which has been nominated
- uint32_t frame_interval = (time_interval * frame_difference) / time_difference;
+ uint32_t frame_interval = 0;
+ if (time_difference)
+ frame_interval = (time_interval * frame_difference) / time_difference;
+ else
+ debug(1,"local_time_to_frame: time_difference is zero");
if (reference_time_was_earlier) {
// debug(1,"Frame interval is %" PRId64 " frames.",frame_interval);
*frame = (conn->reference_timestamp + frame_interval);
debug(1, "mqtt is %sabled.", config.mqtt_enabled ? "en" : "dis");
debug(1, "mqtt hostname is %s, port is %d.", config.mqtt_hostname, config.mqtt_port);
debug(1, "mqtt topic is %s.", config.mqtt_topic);
- debug(1, "mqtt will%s publish raw metadata.", config.mqtt_publish_raw ? "" : " NOT");
- debug(1, "mqtt will%s publish parsed metadata.", config.mqtt_publish_parsed ? "" : " NOT");
- debug(1, "mqtt will%s publish cover Art.", config.mqtt_publish_cover ? "" : " NOT");
+ debug(1, "mqtt will%s publish raw metadata.", config.mqtt_publish_raw ? "" : " not");
+ debug(1, "mqtt will%s publish parsed metadata.", config.mqtt_publish_parsed ? "" : " not");
+ debug(1, "mqtt will%s publish cover Art.", config.mqtt_publish_cover ? "" : " not");
debug(1, "mqtt remote control is %sabled.", config.mqtt_enable_remote ? "en" : "dis");
#endif