Loading media/libmediaplayerservice/MediaPlayerService.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ #include <media/Metadata.h> #include <media/AudioTrack.h> #include <media/MemoryLeakTrackUtil.h> #include <media/stagefright/MediaErrors.h> #include <system/audio.h> Loading Loading @@ -1132,7 +1133,11 @@ sp<IMemory> MediaPlayerService::decode(const char* url, uint32_t *pSampleRate, i player->start(); LOGV("wait for playback complete"); if (cache->wait() != NO_ERROR) goto Exit; cache->wait(); // in case of error, return what was successfully decoded. if (cache->size() == 0) { goto Exit; } mem = new MemoryBase(cache->getHeap(), 0, cache->size()); *pSampleRate = cache->sampleRate(); Loading Loading @@ -1175,7 +1180,11 @@ sp<IMemory> MediaPlayerService::decode(int fd, int64_t offset, int64_t length, u player->start(); LOGV("wait for playback complete"); if (cache->wait() != NO_ERROR) goto Exit; cache->wait(); // in case of error, return what was successfully decoded. if (cache->size() == 0) { goto Exit; } mem = new MemoryBase(cache->getHeap(), 0, cache->size()); *pSampleRate = cache->sampleRate(); Loading Loading
media/libmediaplayerservice/MediaPlayerService.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ #include <media/Metadata.h> #include <media/AudioTrack.h> #include <media/MemoryLeakTrackUtil.h> #include <media/stagefright/MediaErrors.h> #include <system/audio.h> Loading Loading @@ -1132,7 +1133,11 @@ sp<IMemory> MediaPlayerService::decode(const char* url, uint32_t *pSampleRate, i player->start(); LOGV("wait for playback complete"); if (cache->wait() != NO_ERROR) goto Exit; cache->wait(); // in case of error, return what was successfully decoded. if (cache->size() == 0) { goto Exit; } mem = new MemoryBase(cache->getHeap(), 0, cache->size()); *pSampleRate = cache->sampleRate(); Loading Loading @@ -1175,7 +1180,11 @@ sp<IMemory> MediaPlayerService::decode(int fd, int64_t offset, int64_t length, u player->start(); LOGV("wait for playback complete"); if (cache->wait() != NO_ERROR) goto Exit; cache->wait(); // in case of error, return what was successfully decoded. if (cache->size() == 0) { goto Exit; } mem = new MemoryBase(cache->getHeap(), 0, cache->size()); *pSampleRate = cache->sampleRate(); Loading