diff --git a/CHANGELOG.md b/CHANGELOG.md index 6755fce..9a94f2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ Each release is tagged in Git and on the Docker repository ## `v0.6.3` (in progress) * Compile fix for nightly rust 2021-03-14 and beyond. +* Fix incorrect `prev_media_duration_90k` calculation. No current impact. + This field is intended to be used in an upcoming scrub bar UI, and when + not calculated properly there might be unexpected gaps or overlaps in + playback. ## `v0.6.2` diff --git a/server/db/db.rs b/server/db/db.rs index df5200a..3228e30 100644 --- a/server/db/db.rs +++ b/server/db/db.rs @@ -826,7 +826,7 @@ impl LockedDatabase { Some(s) => { let l = s.lock(); r.prev_media_duration = - l.prev_media_duration + recording::Duration(l.wall_duration_90k.into()); + l.prev_media_duration + recording::Duration(l.media_duration_90k.into()); r.prev_runs = l.prev_runs + if l.run_offset == 0 { 1 } else { 0 }; } None => { diff --git a/server/db/schema.sql b/server/db/schema.sql index 97f5981..e37cb43 100644 --- a/server/db/schema.sql +++ b/server/db/schema.sql @@ -192,7 +192,8 @@ create table recording ( wall_duration_90k integer not null check (wall_duration_90k >= 0 and wall_duration_90k < 5*60*90000), - -- TODO: comment. + -- The media-time duration of the recording, relative to wall_duration_90k. + -- That is, media_duration_90k = wall_duration_90k + media_duration_delta_90k. media_duration_delta_90k integer not null, video_samples integer not null check (video_samples > 0),