summaryrefslogtreecommitdiff
path: root/src/test_seeking
diff options
context:
space:
mode:
authorJosh Coalson <jcoalson@users.sourceforce.net>2007-06-20 01:26:52 +0000
committerJosh Coalson <jcoalson@users.sourceforce.net>2007-06-20 01:26:52 +0000
commit74d568926b4787a8bc7acdabb30b3fb15254ab28 (patch)
tree1db475c8abf3227db9cfb8f2a81871a6ae957c31 /src/test_seeking
parent89f01a8019e6ef1000c92eaf28dc8cc019b82471 (diff)
downloadflac-74d568926b4787a8bc7acdabb30b3fb15254ab28.tar.gz
fix windows bugs
Diffstat (limited to 'src/test_seeking')
-rw-r--r--src/test_seeking/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test_seeking/main.c b/src/test_seeking/main.c
index 4f54b22c..dd8c09bc 100644
--- a/src/test_seeking/main.c
+++ b/src/test_seeking/main.c
@@ -88,7 +88,7 @@ static off_t get_filesize_(const char *srcpath)
static FLAC__bool read_pcm_(FLAC__int32 *pcm[], const char *rawfilename, const char *flacfilename)
{
FILE *f;
- unsigned channels, bps, samples, i, j;
+ unsigned channels = 0, bps = 0, samples, i, j;
off_t rawfilesize = get_filesize_(rawfilename);
if (rawfilesize < 0) {
@@ -142,7 +142,7 @@ static FLAC__bool read_pcm_(FLAC__int32 *pcm[], const char *rawfilename, const c
return false;
}
}
- if(0 == (f = fopen(rawfilename, "r"))) {
+ if(0 == (f = fopen(rawfilename, "rb"))) {
printf("ERROR: opening %s for reading\n", rawfilename);
return false;
}
@@ -348,9 +348,9 @@ static FLAC__bool seek_barrage(FLAC__bool is_ogg, const char *filename, off_t fi
}
#ifdef _MSC_VER
- printf("seek(%I64u)... ", pos);
+ printf("#%u:seek(%I64u)... ", i, pos);
#else
- printf("seek(%llu)... ", (unsigned long long)pos);
+ printf("#%u:seek(%llu)... ", i, (unsigned long long)pos);
#endif
fflush(stdout);
if(!FLAC__stream_decoder_seek_absolute(decoder, pos)) {
@@ -438,7 +438,7 @@ int main(int argc, char *argv[])
count = strtoul(argv[2], 0, 10);
if (argc > 3)
#ifdef _MSC_VER
- samples = local__strtoull(argv[4]);
+ samples = local__strtoull(argv[3]);
#else
samples = strtoull(argv[3], 0, 10);
#endif