summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/MediaPlayerFactory.cpp
diff options
context:
space:
mode:
authorRachad Alao <rachad@google.com>2014-08-25 21:46:34 +0000
committerRachad Alao <rachad@google.com>2014-08-25 21:46:34 +0000
commitda65048e8e6f65ed9b3f23cda3f4554025c76fc4 (patch)
tree8910f75df98402eda34d2e16ca26aafac05422fb /media/libmediaplayerservice/MediaPlayerFactory.cpp
parent9b48f5d780757ffb81709df3633d06b62edaf39f (diff)
downloadframeworks_av-da65048e8e6f65ed9b3f23cda3f4554025c76fc4.zip
frameworks_av-da65048e8e6f65ed9b3f23cda3f4554025c76fc4.tar.gz
frameworks_av-da65048e8e6f65ed9b3f23cda3f4554025c76fc4.tar.bz2
Revert "disable AwesomePlayer for Ogg vorbis"
Temporarily revert commit 9b48f5d780757ffb81709df3633d06b62edaf39f as a workaround for b/17173673 Bug: 17173673 Change-Id: Iec52289e77485a58ce28cc515d6a5b8e7b2d328a
Diffstat (limited to 'media/libmediaplayerservice/MediaPlayerFactory.cpp')
-rw-r--r--media/libmediaplayerservice/MediaPlayerFactory.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerFactory.cpp b/media/libmediaplayerservice/MediaPlayerFactory.cpp
index 3e0fc0d..dacb144 100644
--- a/media/libmediaplayerservice/MediaPlayerFactory.cpp
+++ b/media/libmediaplayerservice/MediaPlayerFactory.cpp
@@ -60,7 +60,7 @@ status_t MediaPlayerFactory::registerFactory_l(IFactory* factory,
return OK;
}
-static player_type getDefaultPlayerType() {
+player_type MediaPlayerFactory::getDefaultPlayerType() {
char value[PROPERTY_VALUE_MAX];
if (property_get("media.stagefright.use-awesome", value, NULL)
&& (!strcmp("1", value) || !strcasecmp("true", value))) {
@@ -181,19 +181,16 @@ class StagefrightPlayerFactory :
int64_t offset,
int64_t /*length*/,
float /*curScore*/) {
- if (getDefaultPlayerType()
- == STAGEFRIGHT_PLAYER) {
- char buf[20];
- lseek(fd, offset, SEEK_SET);
- read(fd, buf, sizeof(buf));
- lseek(fd, offset, SEEK_SET);
-
- uint32_t ident = *((uint32_t*)buf);
-
- // Ogg vorbis?
- if (ident == 0x5367674f) // 'OggS'
- return 1.0;
- }
+ char buf[20];
+ lseek(fd, offset, SEEK_SET);
+ read(fd, buf, sizeof(buf));
+ lseek(fd, offset, SEEK_SET);
+
+ uint32_t ident = *((uint32_t*)buf);
+
+ // Ogg vorbis?
+ if (ident == 0x5367674f) // 'OggS'
+ return 1.0;
return 0.0;
}