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

Commit da65048e authored by Rachad Alao's avatar Rachad Alao
Browse files

Revert "disable AwesomePlayer for Ogg vorbis"

Temporarily revert commit 9b48f5d7 as a workaround for b/17173673

Bug: 17173673
Change-Id: Iec52289e77485a58ce28cc515d6a5b8e7b2d328a
parent 9b48f5d7
Loading
Loading
Loading
Loading
+11 −14
Original line number Original line Diff line number Diff line
@@ -60,7 +60,7 @@ status_t MediaPlayerFactory::registerFactory_l(IFactory* factory,
    return OK;
    return OK;
}
}


static player_type getDefaultPlayerType() {
player_type MediaPlayerFactory::getDefaultPlayerType() {
    char value[PROPERTY_VALUE_MAX];
    char value[PROPERTY_VALUE_MAX];
    if (property_get("media.stagefright.use-awesome", value, NULL)
    if (property_get("media.stagefright.use-awesome", value, NULL)
            && (!strcmp("1", value) || !strcasecmp("true", value))) {
            && (!strcmp("1", value) || !strcasecmp("true", value))) {
@@ -181,8 +181,6 @@ class StagefrightPlayerFactory :
                               int64_t offset,
                               int64_t offset,
                               int64_t /*length*/,
                               int64_t /*length*/,
                               float /*curScore*/) {
                               float /*curScore*/) {
        if (getDefaultPlayerType()
                == STAGEFRIGHT_PLAYER) {
        char buf[20];
        char buf[20];
        lseek(fd, offset, SEEK_SET);
        lseek(fd, offset, SEEK_SET);
        read(fd, buf, sizeof(buf));
        read(fd, buf, sizeof(buf));
@@ -193,7 +191,6 @@ class StagefrightPlayerFactory :
        // Ogg vorbis?
        // Ogg vorbis?
        if (ident == 0x5367674f) // 'OggS'
        if (ident == 0x5367674f) // 'OggS'
            return 1.0;
            return 1.0;
        }


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


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


    static Mutex       sLock;
    static Mutex       sLock;
    static tFactoryMap sFactoryMap;
    static tFactoryMap sFactoryMap;