Bug 824230: Handle UNKNOWN_ERROR in OmxDecoder. r=doublec

This commit is contained in:
Chris Jones 2012-12-24 15:43:10 -08:00
Родитель a50455d556
Коммит 772a6743c1
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -560,6 +560,11 @@ bool OmxDecoder::ReadVideo(VideoFrame *aFrame, int64_t aTimeUs,
else if (err == ERROR_END_OF_STREAM) {
return false;
}
else if (err == UNKNOWN_ERROR) {
// This sometimes is used to mean "out of memory", but regardless,
// don't keep trying to decode if the decoder doesn't want to.
return false;
}
return true;
}
@ -568,6 +573,10 @@ bool OmxDecoder::ReadAudio(AudioFrame *aFrame, int64_t aSeekTimeUs)
{
status_t err;
if (!mAudioBuffer) {
return false;
}
if (mAudioMetadataRead && aSeekTimeUs == -1) {
// Use the data read into the buffer during metadata time
err = OK;
@ -610,6 +619,9 @@ bool OmxDecoder::ReadAudio(AudioFrame *aFrame, int64_t aSeekTimeUs)
return false;
}
}
else if (err == UNKNOWN_ERROR) {
return false;
}
return true;
}