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

Commit ee38fad5 authored by Wei Jia's avatar Wei Jia Committed by Gerrit Code Review
Browse files

Merge "MPEG4Extractor: cast media time to int64_t in order to avoid check on...

Merge "MPEG4Extractor: cast media time to int64_t in order to avoid check on unsigned integer overflow."
parents eb048299 608fe1d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1022,7 +1022,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
                    int64_t delay = (media_time  * samplerate + 500000) / 1000000;
                    mLastTrack->meta->setInt32(kKeyEncoderDelay, delay);

                    int64_t paddingus = duration - (segment_duration + media_time);
                    int64_t paddingus = duration - (int64_t)(segment_duration + media_time);
                    if (paddingus < 0) {
                        // track duration from media header (which is what kKeyDuration is) might
                        // be slightly shorter than the segment duration, which would make the