vpxenc: fix rollover in status output
sizeof(unsigned long)=4 in 32-bit builds Change-Id: I81c9d698c80ffaa332214e5b43e98b4e30cf9e88
This commit is contained in:
parent
8d00562fba
commit
efa17efced
11
vpxenc.c
11
vpxenc.c
@ -1753,7 +1753,7 @@ int main(int argc, const char **argv_)
|
|||||||
for (pass = one_pass_only ? one_pass_only - 1 : 0; pass < arg_passes; pass++)
|
for (pass = one_pass_only ? one_pass_only - 1 : 0; pass < arg_passes; pass++)
|
||||||
{
|
{
|
||||||
int frames_in = 0, frames_out = 0;
|
int frames_in = 0, frames_out = 0;
|
||||||
unsigned long nbytes = 0;
|
int64_t nbytes = 0;
|
||||||
struct detect_buffer detect;
|
struct detect_buffer detect;
|
||||||
|
|
||||||
/* Parse certain options from the input file, if possible */
|
/* Parse certain options from the input file, if possible */
|
||||||
@ -1970,8 +1970,8 @@ int main(int argc, const char **argv_)
|
|||||||
frames_in++;
|
frames_in++;
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"\rPass %d/%d frame %4d/%-4d %7ldB \033[K", pass + 1,
|
"\rPass %d/%d frame %4d/%-4d %7"PRId64"B \033[K",
|
||||||
arg_passes, frames_in, frames_out, nbytes);
|
pass + 1, arg_passes, frames_in, frames_out, nbytes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
frame_avail = 0;
|
frame_avail = 0;
|
||||||
@ -2065,9 +2065,10 @@ int main(int argc, const char **argv_)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"\rPass %d/%d frame %4d/%-4d %7ldB %7ldb/f %7"PRId64"b/s"
|
"\rPass %d/%d frame %4d/%-4d %7"PRId64"B %7lub/f %7"PRId64"b/s"
|
||||||
" %7lu %s (%.2f fps)\033[K", pass + 1,
|
" %7lu %s (%.2f fps)\033[K", pass + 1,
|
||||||
arg_passes, frames_in, frames_out, nbytes, nbytes * 8 / frames_in,
|
arg_passes, frames_in, frames_out, nbytes,
|
||||||
|
(unsigned long)(nbytes * 8 / frames_in),
|
||||||
nbytes * 8 *(int64_t)arg_framerate.num / arg_framerate.den / frames_in,
|
nbytes * 8 *(int64_t)arg_framerate.num / arg_framerate.den / frames_in,
|
||||||
cx_time > 9999999 ? cx_time / 1000 : cx_time,
|
cx_time > 9999999 ? cx_time / 1000 : cx_time,
|
||||||
cx_time > 9999999 ? "ms" : "us",
|
cx_time > 9999999 ? "ms" : "us",
|
||||||
|
Loading…
Reference in New Issue
Block a user