Skip to content

Commit 6afff10

Browse files
Track total bytes for progress output in pid_printer
1 parent f759621 commit 6afff10

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mythtv/programs/mythutil/mpegutils.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ static int pid_printer(const MythUtilCommandLineParser &cmdline)
660660
const int kBufSize = 2 * 1024 * 1024;
661661
char *buffer = new char[kBufSize];
662662
int offset = 0;
663+
uint64_t totalBytes = 0ULL;
663664

664665
while (true)
665666
{
@@ -671,10 +672,11 @@ static int pid_printer(const MythUtilCommandLineParser &cmdline)
671672

672673
offset = sd->ProcessData((const unsigned char*)buffer, len);
673674

675+
totalBytes += len - offset;
674676
LOG(VB_STDIO|VB_FLUSH, logLevel,
675677
QString("\r \r"
676678
"Processed %1 bytes")
677-
.arg(len - offset));
679+
.arg(totalBytes));
678680
}
679681
LOG(VB_STDIO|VB_FLUSH, logLevel, "\n");
680682

0 commit comments

Comments
 (0)