Commit 26f6d37e authored by conrad's avatar conrad

add FILE* parameter to ot_print_time()


git-svn-id: http://svn.annodex.net/liboggz/trunk@1187 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 802ead27
...@@ -275,7 +275,7 @@ ot_print_bitrate (long bps) ...@@ -275,7 +275,7 @@ ot_print_bitrate (long bps)
} }
int int
ot_print_time (double seconds) ot_fprint_time (FILE * stream, double seconds)
{ {
int hrs, min; int hrs, min;
double sec; double sec;
...@@ -291,9 +291,9 @@ ot_print_time (double seconds) ...@@ -291,9 +291,9 @@ ot_print_time (double seconds)
/* XXX: %02.3f workaround */ /* XXX: %02.3f workaround */
if (sec < 10.0) { if (sec < 10.0) {
return printf ("%s%02d:%02d:0%2.3f", sign, hrs, min, sec); return fprintf (stream, "%s%02d:%02d:0%2.3f", sign, hrs, min, sec);
} else { } else {
return printf ("%s%02d:%02d:%02.3f", sign, hrs, min, sec); return fprintf (stream, "%s%02d:%02d:%02.3f", sign, hrs, min, sec);
} }
} }
......
...@@ -50,7 +50,7 @@ int ot_fprint_bytes (FILE * stream, long nr_bytes); ...@@ -50,7 +50,7 @@ int ot_fprint_bytes (FILE * stream, long nr_bytes);
*/ */
int ot_print_bitrate (long bps); int ot_print_bitrate (long bps);
int ot_print_time (double seconds); int ot_fprint_time (FILE * stream, double seconds);
/* /*
* Tool initialization function. Sets stdin, stdio to binary on windows etc. * Tool initialization function. Sets stdin, stdio to binary on windows etc.
......
...@@ -504,7 +504,7 @@ main (int argc, char ** argv) ...@@ -504,7 +504,7 @@ main (int argc, char ** argv)
if (many_files) if (many_files)
printf ("Filename: %s\n", infilename); printf ("Filename: %s\n", infilename);
fputs ("Content-Duration: ", stdout); fputs ("Content-Duration: ", stdout);
ot_print_time ((double)info.duration / 1000.0); ot_fprint_time (stdout, (double)info.duration / 1000.0);
putchar ('\n'); putchar ('\n');
if (show_length) { if (show_length) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment