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

Commit 9d60bd74 authored by Keyan Mobli's avatar Keyan Mobli Committed by Gerrit Code Review
Browse files

Merge "stagefright: allow targets to pass real dimensions to the decoder" into gingerbread

parents 812720dc 9c5aa564
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -47,4 +47,8 @@ LOCAL_C_INCLUDES := \

LOCAL_CFLAGS := -DOSCL_EXPORT_REF= -DOSCL_IMPORT_REF=

ifeq ($(TARGET_SF_NEEDS_REAL_DIMENSIONS),true))
        LOCAL_CFLAGS += -DTARGET_SF_NEEDS_REAL_DIMENSIONS
endif

include $(BUILD_STATIC_LIBRARY)
+5 −3
Original line number Diff line number Diff line
@@ -45,15 +45,17 @@ M4vH263Decoder::M4vH263Decoder(const sp<MediaSource> &source)
    mFormat = new MetaData;
    mFormat->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_RAW);

    // CHECK(mSource->getFormat()->findInt32(kKeyWidth, &mWidth));
    // CHECK(mSource->getFormat()->findInt32(kKeyHeight, &mHeight));

#ifdef TARGET_SF_NEEDS_REAL_DIMENSIONS
    CHECK(mSource->getFormat()->findInt32(kKeyWidth, &mWidth));
    CHECK(mSource->getFormat()->findInt32(kKeyHeight, &mHeight));
#else
    // We'll ignore the dimension advertised by the source, the decoder
    // appears to require us to always start with the default dimensions
    // of 352 x 288 to operate correctly and later react to changes in
    // the dimensions as needed.
    mWidth = 352;
    mHeight = 288;
#endif

    mFormat->setInt32(kKeyWidth, mWidth);
    mFormat->setInt32(kKeyHeight, mHeight);