diff options
Diffstat (limited to 'media/libmediaplayerservice/StagefrightRecorder.cpp')
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index 5756e53..daa20a8 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -56,11 +56,6 @@ StagefrightRecorder::StagefrightRecorder() StagefrightRecorder::~StagefrightRecorder() { LOGV("Destructor"); stop(); - - if (mOutputFd >= 0) { - ::close(mOutputFd); - mOutputFd = -1; - } } status_t StagefrightRecorder::init() { @@ -1158,6 +1153,11 @@ status_t StagefrightRecorder::stop() { mFlags = 0; } + if (mOutputFd >= 0) { + ::close(mOutputFd); + mOutputFd = -1; + } + return OK; } |