зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1154194 - Call FillCodecInputData before dequeueOutputBuffer, remove the check of FillCodecInputData. r=sotaro
This commit is contained in:
Родитель
2dcbea5eae
Коммит
9a3bbcae4e
|
@ -1869,6 +1869,7 @@ MediaCodecReader::EnsureCodecFormatParsed(Track& aTrack)
|
|||
size_t size = 0;
|
||||
int64_t timeUs = INT64_C(0);
|
||||
uint32_t flags = 0;
|
||||
FillCodecInputData(aTrack);
|
||||
while ((status = aTrack.mCodec->dequeueOutputBuffer(&index, &offset, &size,
|
||||
&timeUs, &flags)) != INFO_FORMAT_CHANGED) {
|
||||
if (status == OK) {
|
||||
|
@ -1879,17 +1880,11 @@ MediaCodecReader::EnsureCodecFormatParsed(Track& aTrack)
|
|||
NS_WARNING("Couldn't get output buffers from MediaCodec");
|
||||
return false;
|
||||
}
|
||||
} else if (status != -EAGAIN && status != INVALID_OPERATION){
|
||||
} else if (status != -EAGAIN && status != INVALID_OPERATION) {
|
||||
// FIXME: let INVALID_OPERATION pass?
|
||||
return false; // something wrong!!!
|
||||
}
|
||||
|
||||
status = FillCodecInputData(aTrack);
|
||||
if (status == INFO_FORMAT_CHANGED) {
|
||||
break;
|
||||
} else if (status != OK) {
|
||||
return false;
|
||||
}
|
||||
FillCodecInputData(aTrack);
|
||||
}
|
||||
return aTrack.mCodec->getOutputFormat(&format) == OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче