#include <media/Metadata.h>
#include <media/AudioTrack.h>
#include <media/MemoryLeakTrackUtil.h>
+#include <media/stagefright/MediaErrors.h>
#include <system/audio.h>
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();
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();