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

Commit 75cfc881 authored by Lajos Molnar's avatar Lajos Molnar Committed by android-build-merger
Browse files

am 8ed5afa3: Merge "mediaplayer: request auto-frc for high quality avsync" into lmp-mr1-dev

automerge: 225f4f6d

* commit '225f4f6d':
  mediaplayer: request auto-frc for high quality avsync
parents 3efe6516 225f4f6d
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@

#include "ATSParser.h"

#include <cutils/properties.h>

#include <media/stagefright/foundation/hexdump.h>
#include <media/stagefright/foundation/ABuffer.h>
#include <media/stagefright/foundation/ADebug.h>
@@ -1201,6 +1203,17 @@ status_t NuPlayer::instantiateDecoder(bool audio, sp<Decoder> *decoder) {
        notify->setInt32("generation", mVideoDecoderGeneration);

        *decoder = new Decoder(notify, mSource, mRenderer, mNativeWindow);

        // enable FRC if high-quality AV sync is requested, even if not
        // queuing to native window, as this will even improve textureview
        // playback.
        {
            char value[PROPERTY_VALUE_MAX];
            if (property_get("persist.sys.media.avsync", value, NULL) &&
                    (!strcmp("1", value) || !strcasecmp("true", value))) {
                format->setInt32("auto-frc", 1);
            }
        }
    }
    (*decoder)->init();
    (*decoder)->configure(format);