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

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

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

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

Merge commit 'bb506dab'

* commit 'bb506dab':
  Don't retrieve metadata unless necessary for ogg-vorbis ringtone auto-looping.
parents 934f042a bb506dab
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -320,6 +320,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
@@ -327,6 +332,7 @@ status_t AwesomePlayer::setDataSource_l(const sp<MediaExtractor> &extractor) {
                    mFlags |= AUTO_LOOPING;
                }
            }
        }

        if (haveAudio && haveVideo) {
            break;