Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
flac
Commits
9ce060e4
Commit
9ce060e4
authored
Jan 27, 2005
by
Josh Coalson
Browse files
add missing decoder finish calls
parent
27ae3485
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test_seeking/main.c
View file @
9ce060e4
...
...
@@ -278,7 +278,7 @@ static FLAC__bool seek_barrage_native_flac(const char *filename, off_t filesize,
else
printf
(
"seek past end failed as expected... "
);
/* hack to work around a deficiency in the seek API's b
a
havior */
/* hack to work around a deficiency in the seek API's b
e
havior */
/* seeking past EOF sets the file decoder state to non-OK and there's no ..._flush() or ..._reset() call to reset it */
if
(
!
FLAC__file_decoder_finish
(
decoder
))
return
die_f_
(
"FLAC__file_decoder_finish() FAILED"
,
decoder
);
...
...
@@ -320,6 +320,11 @@ static FLAC__bool seek_barrage_native_flac(const char *filename, off_t filesize,
fflush
(
stdout
);
}
if
(
FLAC__file_decoder_get_state
(
decoder
)
!=
FLAC__FILE_DECODER_UNINITIALIZED
)
{
if
(
!
FLAC__file_decoder_finish
(
decoder
))
return
die_f_
(
"FLAC__file_decoder_finish() FAILED"
,
decoder
);
}
printf
(
"
\n
PASSED!
\n
"
);
return
true
;
...
...
@@ -414,7 +419,7 @@ static FLAC__bool seek_barrage_ogg_flac(const char *filename, off_t filesize, un
printf
(
"seek failed, assuming it was past EOF... "
);
else
printf
(
"seek past end failed as expected... "
);
/* hack to work around a deficiency in the seek API's b
a
havior */
/* hack to work around a deficiency in the seek API's b
e
havior */
/* seeking past EOF sets the file decoder state to non-OK and there's no ..._flush() or ..._reset() call to reset it */
if
(
!
OggFLAC__file_decoder_finish
(
decoder
))
return
die_of_
(
"OggFLAC__file_decoder_finish() FAILED"
,
decoder
);
...
...
@@ -456,6 +461,11 @@ static FLAC__bool seek_barrage_ogg_flac(const char *filename, off_t filesize, un
fflush
(
stdout
);
}
if
(
OggFLAC__file_decoder_get_state
(
decoder
)
!=
OggFLAC__FILE_DECODER_UNINITIALIZED
)
{
if
(
!
OggFLAC__file_decoder_finish
(
decoder
))
return
die_of_
(
"OggFLAC__file_decoder_finish() FAILED"
,
decoder
);
}
printf
(
"
\n
PASSED!
\n
"
);
return
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment