summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-07-01 18:33:18 -0700
committerMathias Agopian <mathias@google.com>2009-07-01 18:33:18 -0700
commit82827d70378961f30077d3a35a06aab58c368d52 (patch)
treeb2f42dc6c581b7cecbde68d1d3cb594344d76c70
parente35922dc7121ddbd2ec7923e0756adb92046b8ff (diff)
parent24a5bdab1a1fb8516c270927b811763510986c8f (diff)
downloadframeworks_av-82827d70378961f30077d3a35a06aab58c368d52.zip
frameworks_av-82827d70378961f30077d3a35a06aab58c368d52.tar.gz
frameworks_av-82827d70378961f30077d3a35a06aab58c368d52.tar.bz2
Merge commit 'goog/master' into merge_master
-rw-r--r--media/libmediaplayerservice/VorbisPlayer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/media/libmediaplayerservice/VorbisPlayer.cpp b/media/libmediaplayerservice/VorbisPlayer.cpp
index 14fd6ce..7f0ef21 100644
--- a/media/libmediaplayerservice/VorbisPlayer.cpp
+++ b/media/libmediaplayerservice/VorbisPlayer.cpp
@@ -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;