summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/AMRWriter.h
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2012-02-02 15:07:52 -0800
committerJames Dong <jdong@google.com>2012-02-02 15:13:56 -0800
commit8bcc65c753085fe3328592cceda0cf0e8f8b0a45 (patch)
treef7f9cff24dbf50e02f135b65bc1041e534c39d9c /include/media/stagefright/AMRWriter.h
parent2af955b7437ac5345d75a5e528ebbb749667af7e (diff)
downloadframeworks_av-8bcc65c753085fe3328592cceda0cf0e8f8b0a45.zip
frameworks_av-8bcc65c753085fe3328592cceda0cf0e8f8b0a45.tar.gz
frameworks_av-8bcc65c753085fe3328592cceda0cf0e8f8b0a45.tar.bz2
Don't call virtual functions in destructors for the writer classes
Have not found any concrete bugs related to these calls yet, but we should avoid calling virtual functions in destructors, regardless. Change-Id: I2d47b79d3fb2d29f418619bee83aa147d232a5d4
Diffstat (limited to 'include/media/stagefright/AMRWriter.h')
-rw-r--r--include/media/stagefright/AMRWriter.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/media/stagefright/AMRWriter.h b/include/media/stagefright/AMRWriter.h
index 62d57b4..392f968 100644
--- a/include/media/stagefright/AMRWriter.h
+++ b/include/media/stagefright/AMRWriter.h
@@ -37,7 +37,7 @@ struct AMRWriter : public MediaWriter {
virtual status_t addSource(const sp<MediaSource> &source);
virtual bool reachedEOS();
virtual status_t start(MetaData *params = NULL);
- virtual status_t stop();
+ virtual status_t stop() { return reset(); }
virtual status_t pause();
protected:
@@ -60,6 +60,7 @@ private:
status_t threadFunc();
bool exceedsFileSizeLimit();
bool exceedsFileDurationLimit();
+ status_t reset();
AMRWriter(const AMRWriter &);
AMRWriter &operator=(const AMRWriter &);