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

Commit bb506dab authored by Andreas Huber's avatar Andreas Huber Committed by Android Git Automerger
Browse files

am 7fa69374: Merge "Don\'t retrieve metadata unless necessary for ogg-vorbis...

am 7fa69374: Merge "Don\'t retrieve metadata unless necessary for ogg-vorbis ringtone auto-looping." into gingerbread

Merge commit '7fa69374' into gingerbread-plus-aosp

* commit '7fa69374':
  Don't retrieve metadata unless necessary for ogg-vorbis ringtone auto-looping.
parents 44fad94a 7fa69374
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -317,6 +317,11 @@ status_t AwesomePlayer::setDataSource_l(const sp<MediaExtractor> &extractor) {
            setAudioSource(extractor->getTrack(i));
            haveAudio = true;

            if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_VORBIS)) {
                // Only do this for vorbis audio, none of the other audio
                // formats even support this ringtone specific hack and
                // retrieving the metadata on some extractors may turn out
                // to be very expensive.
                sp<MetaData> fileMeta = extractor->getMetaData();
                int32_t loop;
                if (fileMeta != NULL
@@ -324,6 +329,7 @@ status_t AwesomePlayer::setDataSource_l(const sp<MediaExtractor> &extractor) {
                    mFlags |= AUTO_LOOPING;
                }
            }
        }

        if (haveAudio && haveVideo) {
            break;