There are many scenarios where the codec may not return a valid buffer. In such a case, the OMXCodec::read() call hangs indefitely. Therefore, wait() call is replaced with waitRelative() so that it timesout after a few seconds and we exit gracefully. Change-Id: Ie03c5d1e979b71f6253efcaa0665aa5e541cebe2 Signed-off-by: Anu Sundararajan <sanuradha@ti.com>