From da65048e8e6f65ed9b3f23cda3f4554025c76fc4 Mon Sep 17 00:00:00 2001 From: Rachad Alao Date: Mon, 25 Aug 2014 21:46:34 +0000 Subject: Revert "disable AwesomePlayer for Ogg vorbis" Temporarily revert commit 9b48f5d780757ffb81709df3633d06b62edaf39f as a workaround for b/17173673 Bug: 17173673 Change-Id: Iec52289e77485a58ce28cc515d6a5b8e7b2d328a --- media/libmediaplayerservice/MediaPlayerFactory.cpp | 25 ++++++++++------------ 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'media/libmediaplayerservice/MediaPlayerFactory.cpp') 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; } -- cgit v1.1