tools/dav1d: initialize elapsed

Based on the following comment on IRC:
"<aconz2> the `elapsed` variable in main() is read uninitialized in
 synchronize and makes the first frametime with --frametime incorrect
 I think. Should be initialized to 0"

Confirmed that after initializing to zero, the first line in the file
generated by --frametime is reasonable.
This commit is contained in:
Ronald S. Bultje
2025-07-01 08:26:31 -04:00
parent a86d561b79
commit 583e8e02eb
+1 -1
View File
@@ -198,7 +198,7 @@ int main(const int argc, char *const *const argv) {
Dav1dContext *c;
Dav1dData data;
unsigned n_out = 0, total, fps[2], timebase[2];
uint64_t nspf, tfirst, elapsed;
uint64_t nspf, tfirst, elapsed = 0;
double i_fps;
FILE *frametimes = NULL;
const unsigned version = dav1d_version_api();