Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 835ae86b authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "Revert "Revert "disable AwesomePlayer for Ogg vorbis""" into lmp-dev

parents cb16968f 48f36a07
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ status_t MediaPlayerFactory::registerFactory_l(IFactory* factory,
    return OK;
}

player_type MediaPlayerFactory::getDefaultPlayerType() {
static player_type getDefaultPlayerType() {
    char value[PROPERTY_VALUE_MAX];
    if (property_get("media.stagefright.use-awesome", value, NULL)
            && (!strcmp("1", value) || !strcasecmp("true", value))) {
@@ -181,6 +181,8 @@ 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));
@@ -191,6 +193,7 @@ class StagefrightPlayerFactory :
            // Ogg vorbis?
            if (ident == 0x5367674f) // 'OggS'
                return 1.0;
        }

        return 0.0;
    }
+0 −1
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@ class MediaPlayerFactory {

    static status_t registerFactory_l(IFactory* factory,
                                      player_type type);
    static player_type getDefaultPlayerType();

    static Mutex       sLock;
    static tFactoryMap sFactoryMap;