• Jean-Michel Trivi's avatar
    Fix bug 5049371 Metadata for decode to PCM buffer queue · 54cad4f3
    Jean-Michel Trivi authored
    When decoding a URI or FD with OpenSL ES to a PCM buffer queue,
     you cannot rely on the information given by the extractor, or
     the OMXCodec before the latter has decoded one buffer.
    
    The fix consists in two parts:
    1/ where to retrieve the PCM format from:
      the information first retrieved from the extractor if available,
      but then overwritten by the OMXCodec values as soon as it
      issues INFO_FORMAT_CHANGED
    2/ when can the application retrieve the information:
      the information is available when the first buffer of decoded
      data is returned to the application via the buffer queue
      callback. The test app is updated to reflect this, and verify
      that the query can safely happen during the callback.
    
    Change-Id: Ic034c7ff9412c94e9df2aaa3c1d61e9d3bf507d9
    54cad4f3
android_AudioToCbRenderer.cpp 3.37 KB