Bug 1118141 - Update Audio buffers when receiving INFO_OUTPUT_BUFFERS_CHANGED. r=edwin.

This commit is contained in:
Blake Wu 2015-01-19 11:57:57 +08:00
parent 3e9930be3e
commit 8cd5047df1

View File

@ -163,12 +163,19 @@ GonkAudioDecoderManager::Output(int64_t aStreamOffset,
return NS_OK; return NS_OK;
} }
case android::INFO_FORMAT_CHANGED: case android::INFO_FORMAT_CHANGED:
case android::INFO_OUTPUT_BUFFERS_CHANGED:
{ {
// If the format changed, update our cached info. // If the format changed, update our cached info.
GADM_LOG("Decoder format changed"); GADM_LOG("Decoder format changed");
return Output(aStreamOffset, aOutData); return Output(aStreamOffset, aOutData);
} }
case android::INFO_OUTPUT_BUFFERS_CHANGED:
{
GADM_LOG("Info Output Buffers Changed");
if (mDecoder->UpdateOutputBuffers()) {
return Output(aStreamOffset, aOutData);
}
return NS_ERROR_FAILURE;
}
case -EAGAIN: case -EAGAIN:
{ {
return NS_ERROR_NOT_AVAILABLE; return NS_ERROR_NOT_AVAILABLE;