libstagefright: mkv parser: check for divx format

bailout if divx is disabled and if video format of the clip is DivX

Change-Id: I600a3f8ccd5e3dc464c8c26477731e6a72589b6d
(cherry picked from commit 928676b82089b320de4366aa3ff214c65b030419)
libmediaplayerservice: Fix bug due to operator precedence

Condition check for offload flag returns false always as bitwise
operator has lesser precedence to relational operator.

CRs-Fixed: 629912
Change-Id: I1843c977bd98cf9a807adaa51a073f9fb744d326
(cherry picked from commit 7b3dc64a08e3269f18c5acebc8cc230b65bf8c71)
AudioFlinger: Introduce CBLK_STREAM_FATAL_ERROR flag

On a fatal error, PlaybackThread (or its derived classes)
can opt to signal an error back to the AudioTrack using
this flag.

Change-Id: Id323df8693c720432a459fe4d844d39033b24598
(cherry picked from commit 85d3fe7a891cf793a70115a75a23fc25b93221d8)
Framework: Fixing media server crash.

Fixing media server crash when dump() is called
from camera framework after camera HAL instance
has been released.

CRs-fixed: 634328

Change-Id: Ia837f5c0e722db4e6a7187062adc5d8bcfc93dca
(cherry picked from commit e0f641e3996db817cbaa5d869d122ab5133b587c)
audioflinger: OffloadThread fix for resume underrun

AudioFlinger can miss resuming h/w on a pause->resume transition
if sufficient data isn't available.

Change-Id: I3632b44571201bb47155f2ed3ad425fe68e04492
CRs-Fixed: 616599
libmedia: Set the correct audio latency in offload mode

- In offload mode latency is decided by Audio HAL.

Change-Id: I0f46ce9cb43e59907c07e77ec57fda47e841b094
CRs-Fixed: 609259
(cherry picked from commit c1055b4e8748e00f5adf40e4fe467add00d6f18c)
stagefright: Correct the updation of extension sample rate

For SBR content, the extension sample rate is being overwritten
with incorrect value when sample rate index is 0xf.
Fix the issue by correcting the logic to update the same.

Change-Id: I126e83665319b143fcfa52d1fb434ebbe453e6e1
CRs-Fixed: 636580
(cherry picked from commit 7ef7314f3daf0ace89fc85725411ff1c6353cfc1)