am 2d9f3169: Merge change 5595 into donut
Merge commit '2d9f31697fb5ece89c80cc66bdd3bd9caa9df9c3' * commit '2d9f31697fb5ece89c80cc66bdd3bd9caa9df9c3': We might try to close the Vorbis file twice under certain
This commit is contained in:
committed by
The Android Open Source Project
commit
548b9920a8
@@ -345,9 +345,6 @@ status_t VorbisPlayer::reset()
|
||||
{
|
||||
LOGV("reset\n");
|
||||
Mutex::Autolock l(mMutex);
|
||||
if (mState != STATE_OPEN) {
|
||||
return NO_ERROR;
|
||||
}
|
||||
return reset_nosync();
|
||||
}
|
||||
|
||||
@@ -355,10 +352,13 @@ status_t VorbisPlayer::reset()
|
||||
status_t VorbisPlayer::reset_nosync()
|
||||
{
|
||||
// close file
|
||||
ov_clear(&mVorbisFile); // this also closes the FILE
|
||||
if (mFile != NULL) {
|
||||
LOGV("OOPS! Vorbis didn't close the file");
|
||||
fclose(mFile);
|
||||
ov_clear(&mVorbisFile); // this also closes the FILE
|
||||
if (mFile != NULL) {
|
||||
LOGV("OOPS! Vorbis didn't close the file");
|
||||
fclose(mFile);
|
||||
mFile = NULL;
|
||||
}
|
||||
}
|
||||
mState = STATE_ERROR;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user