Loading media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp +1 −2 Original line number Original line Diff line number Diff line Loading @@ -762,8 +762,7 @@ void NuPlayer::Decoder::handleOutputFormatChange(const sp<AMessage> &format) { int64_t durationUs; int64_t durationUs; bool hasVideo = (mSource->getFormat(false /* audio */) != NULL); bool hasVideo = (mSource->getFormat(false /* audio */) != NULL); if (getAudioDeepBufferSetting() // override regardless of source duration if (getAudioDeepBufferSetting() // override regardless of source duration || (!hasVideo || (mSource->getDuration(&durationUs) == OK && mSource->getDuration(&durationUs) == OK && durationUs > AUDIO_SINK_MIN_DEEP_BUFFER_DURATION_US)) { && durationUs > AUDIO_SINK_MIN_DEEP_BUFFER_DURATION_US)) { flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER; flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER; } else { } else { Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp +1 −2 Original line number Original line Diff line number Diff line Loading @@ -762,8 +762,7 @@ void NuPlayer::Decoder::handleOutputFormatChange(const sp<AMessage> &format) { int64_t durationUs; int64_t durationUs; bool hasVideo = (mSource->getFormat(false /* audio */) != NULL); bool hasVideo = (mSource->getFormat(false /* audio */) != NULL); if (getAudioDeepBufferSetting() // override regardless of source duration if (getAudioDeepBufferSetting() // override regardless of source duration || (!hasVideo || (mSource->getDuration(&durationUs) == OK && mSource->getDuration(&durationUs) == OK && durationUs > AUDIO_SINK_MIN_DEEP_BUFFER_DURATION_US)) { && durationUs > AUDIO_SINK_MIN_DEEP_BUFFER_DURATION_US)) { flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER; flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER; } else { } else { Loading