Commit b9fbf69
Ocean: Fail trackRecording() when the recording yields no trackable frame
Summary:
`trackRecording()` fell into an unconditional success tail. If `devicePlayer.playNextFrame()` returned an invalid timestamp on the very first iteration, an empty or exhausted recording, the loop broke immediately and the function returned true after moving a still null `anyCamera` and an empty `database` to the caller.
It now returns false when no frame was tracked, leaving the output parameters untouched like every other early exit in the function.
`Database::isEmpty<false>()` is the right predicate and subsumes a separate null camera test: `trackFrame()` adds a pose unconditionally at line 68, so an empty database means no frame was tracked, which in turn means `currentAnyCamera` was never assigned. The sibling reimplementation gates identically at `OnDeviceMapCreatorTracker6DOF.cpp:178`.
No caller exists in fbsource, the only in-repo user of the class reimplements the same loop, so this is reachable through the public API only.
___
Differential Revision: D115260381
fbshipit-source-id: 5e9bb70f6d6f803ad27db300a0c1e48b347969fa1 parent 582942f commit b9fbf69
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
303 | 311 | | |
304 | 312 | | |
305 | 313 | | |
| |||
0 commit comments