diff --git a/src/lib_ccx/wtv_functions.c b/src/lib_ccx/wtv_functions.c index 2514350ee..e30dc3dfc 100644 --- a/src/lib_ccx/wtv_functions.c +++ b/src/lib_ccx/wtv_functions.c @@ -438,10 +438,13 @@ LLONG get_data(struct lib_ccx_ctx *ctx, struct wtv_chunked_buffer *cb, struct de { // Ignore -1 timestamps LLONG pes_time = time_to_pes_time(time); set_current_pts(dec_ctx->timing, pes_time); - // Set min_pts on first valid timestamp to enable fts_now calculation + // Set min_pts and sync_pts on first valid timestamp to enable fts_now calculation if (dec_ctx->timing->min_pts == 0x01FFFFFFFF || pes_time < dec_ctx->timing->min_pts) { dec_ctx->timing->min_pts = pes_time; + // Also set sync_pts to prevent PTS jump detection from triggering + // when pts_set becomes MinPtsSet (sync_pts - current_pts would be huge otherwise) + dec_ctx->timing->sync_pts = pes_time; } // pts_set = 2 (MinPtsSet) is required for proper fts_now calculation dec_ctx->timing->pts_set = 2;