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

Commit 00cb884f authored by Adam Hampson's avatar Adam Hampson Committed by Android (Google) Code Review
Browse files

Merge "StageFright: Removes hacks for Nvidia MPEG2 decoder" into jb-mr2-dev

parents 6e3ee310 34242ac9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1103,8 +1103,7 @@ void AwesomePlayer::initRenderer_l() {
    setVideoScalingMode_l(mVideoScalingMode);
    if (USE_SURFACE_ALLOC
            && !strncmp(component, "OMX.", 4)
            && strncmp(component, "OMX.google.", 11)
            && strcmp(component, "OMX.Nvidia.mpeg2v.decode")) {
            && strncmp(component, "OMX.google.", 11)) {
        // Hardware decoders avoid the CPU color conversion by decoding
        // directly to ANativeBuffers, so we must use a renderer that
        // just pushes those buffers to the ANativeWindow.
+1 −7
Original line number Diff line number Diff line
@@ -359,12 +359,7 @@ sp<MediaSource> OMXCodec::Create(
            observer->setCodec(codec);

            err = codec->configureCodec(meta);

            if (err == OK) {
                if (!strcmp("OMX.Nvidia.mpeg2v.decode", componentName)) {
                    codec->mFlags |= kOnlySubmitOneInputBufferAtOneTime;
                }

                return codec;
            }

@@ -1344,8 +1339,7 @@ OMXCodec::OMXCodec(
      mLeftOverBuffer(NULL),
      mPaused(false),
      mNativeWindow(
              (!strncmp(componentName, "OMX.google.", 11)
              || !strcmp(componentName, "OMX.Nvidia.mpeg2v.decode"))
              (!strncmp(componentName, "OMX.google.", 11))
                        ? NULL : nativeWindow) {
    mPortStatus[kPortIndexInput] = ENABLED;
    mPortStatus[kPortIndexOutput] = ENABLED;