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

Commit 82f49a0c authored by Nick Desaulniers's avatar Nick Desaulniers Committed by android-build-merger
Browse files

Merge "[libstagefright] fix -Wimplicit-int-float-conversion"

am: 6c525b79

Change-Id: I9d6b8e7c2efe1d8ff11619065e331437bd124e28
parents 5ba6aad2 6c525b79
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -304,7 +304,7 @@ static void playSource(sp<MediaSource> &source) {
            seekTimeUs = -1;

            if (shouldSeek) {
                seekTimeUs = (rand() * (float)durationUs) / RAND_MAX;
                seekTimeUs = (rand() * (float)durationUs) / (float)RAND_MAX;
                options.setSeekTo(seekTimeUs);

                printf("seeking to %" PRId64 " us (%.2f secs)\n",
+1 −1
Original line number Diff line number Diff line
@@ -2410,7 +2410,7 @@ status_t ACodec::setOperatingRate(float rateFloat, bool isVideo) {
        }
        rate = (OMX_U32)(rateFloat * 65536.0f + 0.5f);
    } else {
        if (rateFloat > UINT_MAX) {
        if (rateFloat > static_cast<float>(UINT_MAX)) {
            return BAD_VALUE;
        }
        rate = (OMX_U32)(rateFloat);
+1 −1
Original line number Diff line number Diff line
@@ -281,7 +281,7 @@ void MediaClock::processTimers_l() {
            it = mTimers.erase(it);
        } else {
            if (mPlaybackRate != 0.0
                && (double)diffMediaUs < INT64_MAX * (double)mPlaybackRate) {
                && (double)diffMediaUs < (double)INT64_MAX * (double)mPlaybackRate) {
                int64_t targetRealUs = diffMediaUs / (double)mPlaybackRate;
                if (targetRealUs < nextLapseRealUs) {
                    nextLapseRealUs = targetRealUs;
+1 −1
Original line number Diff line number Diff line
@@ -1806,7 +1806,7 @@ void convertMessageToMetaData(const sp<AMessage> &msg, sp<MetaData> &meta) {
    if (msg->findInt32("frame-rate", &fps) && fps > 0) {
        meta->setInt32(kKeyFrameRate, fps);
    } else if (msg->findFloat("frame-rate", &fpsFloat)
            && fpsFloat >= 1 && fpsFloat <= INT32_MAX) {
            && fpsFloat >= 1 && static_cast<int32_t>(fpsFloat) <= INT32_MAX) {
        // truncate values to distinguish between e.g. 24 vs 23.976 fps
        meta->setInt32(kKeyFrameRate, (int32_t)fpsFloat);
    }
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ extern "C"
#endif

#include "pvmp3_audio_type_defs.h"
#define Qfmt_31(a)   (Int32)((float)(a)*0x7FFFFFFF)
#define Qfmt_31(a)   (Int32)((float)(a)*(float)0x7FFFFFFF)

#define Qfmt15(x)   (Int16)((x)*((Int32)1<<15) + ((x)>=0?0.5F:-0.5F))

Loading