mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
clean up video timestamp adjustment in -vsync mode
This commit is contained in:
@@ -469,7 +469,8 @@ uint64_t video_renderer_render_buffer(unsigned char* data, int *data_len, int *n
|
||||
if (pts >= gst_video_pipeline_base_time) {
|
||||
pts -= gst_video_pipeline_base_time;
|
||||
} else {
|
||||
logger_log(logger, LOGGER_ERR, "*** invalid ntp_time < gst_video_pipeline_base_time\n%8.6f ntp_time\n%8.6f base_time",
|
||||
// adjust timestamps to be >= gst_video_pipeline_base time
|
||||
logger_log(logger, LOGGER_DEBUG, "*** invalid ntp_time < gst_video_pipeline_base_time\n%8.6f ntp_time\n%8.6f base_time",
|
||||
((double) *ntp_time) / SECOND_IN_NSECS, ((double) gst_video_pipeline_base_time) / SECOND_IN_NSECS);
|
||||
return (uint64_t) gst_video_pipeline_base_time - pts;
|
||||
}
|
||||
|
||||
@@ -1823,7 +1823,7 @@ extern "C" void video_process (void *cls, raop_ntp_t *ntp, video_decode_struct *
|
||||
data->ntp_time_remote = data->ntp_time_remote + remote_clock_offset;
|
||||
pts_mismatch = video_renderer_render_buffer(data->data, &(data->data_len), &(data->nal_count), &(data->ntp_time_remote));
|
||||
if (pts_mismatch) {
|
||||
LOGI("adjust timestamps by %8.6f secs", (double) (pts_mismatch / SECOND_IN_NSECS));
|
||||
LOGI("adjust timestamps by %8.6f secs", (double) pts_mismatch / SECOND_IN_NSECS);
|
||||
remote_clock_offset += pts_mismatch;
|
||||
}
|
||||
count++;
|
||||
|
||||
Reference in New Issue
Block a user