summaryrefslogtreecommitdiffstats
path: root/cmds/stagefright
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-09-16 14:55:48 -0700
committerAndreas Huber <andih@google.com>2010-09-16 14:55:48 -0700
commit6bfb397dff1663e2ea5b65ecc37080e3f31cb546 (patch)
treeca764fe6394c89d65200e0f24d35686aae8c4a4c /cmds/stagefright
parent8946ab2618a4eebfdf7b00c6b68e6a5d8432cafa (diff)
downloadframeworks_base-6bfb397dff1663e2ea5b65ecc37080e3f31cb546.zip
frameworks_base-6bfb397dff1663e2ea5b65ecc37080e3f31cb546.tar.gz
frameworks_base-6bfb397dff1663e2ea5b65ecc37080e3f31cb546.tar.bz2
Make sure stagefright -o terminates even if we're using a raw audio source (such as .wav pcm)
Change-Id: Iec809df89e6b75706cf5b1ce21006c2e217e018f
Diffstat (limited to 'cmds/stagefright')
-rw-r--r--cmds/stagefright/stagefright.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index 4a1d27b..8ab94ad 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -60,7 +60,7 @@ static int64_t getNowUs() {
return (int64_t)tv.tv_usec + tv.tv_sec * 1000000ll;
}
-static void playSource(OMXClient *client, const sp<MediaSource> &source) {
+static void playSource(OMXClient *client, sp<MediaSource> &source) {
sp<MetaData> meta = source->getFormat();
const char *mime;
@@ -81,6 +81,8 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) {
}
}
+ source.clear();
+
status_t err = rawSource->start();
if (err != OK) {