audio:Avoid VideoLagUpdate if there is no AudioPlayer

-When AudioTrack is failed to initialized, mAudioPlayer
 is deleted in onVideoEvent but onVideoLagUpdate() is still
 trying to access mAudioPlayer which is leading to a crash.
 The function onVideoLagUpdate() is used to notify if video
 is lagging behind audio. So this function is no longer
 valid if AudioPlayer is deleted.

-Fix is to add a check for AudioPlayer in onVideoLagUpdate,
 which will avoid onVideoLagUpdate() if there is no
 AudioPlayer

Change-Id: Ie8dbfc1995a3da88a4a435ec2de86b1c22a07c65
CRs-Fixed: 647200
NuPlayer: Fix ANR while resetting RTSP playback

- When network is poor, the response of RTSP teardown won't be received
  in time, so ANR will happen.
- With this patch, a teardown message will be sent when timeout expires,
  in order to avoid ANR.

Change-Id: I3f9efd9fefa66104ad452559ced5ff5218d73a66
CRs-Fixed: 650866
libstagefright: Fix to free buffers in error scenarios

- MediaBuffer objects are not freed if component transitions from
  IDLE->EXECUTING or EXECUTING->LOADED fails (or if the
  OMX_CmdComplete messages are dropped due to an earlier error)
  Additionally with native buffers, the corresponding
  ANativeWindowBuffers are not cancelled back in the above scenarios.

CRs-Fixed: 640236

Change-Id: I62bdcde5d52ee65cba457a9b5e938e0390d8d9b4
libstagefright - Fix seek on audio having empty stss block

Ignore stss block for audio even if its present, all audio
sample are sync samples itself, self decodeable and playable.

Parsing this block for audio restricts audio seek to few entries
available in this block, sometimes 0, which is undesired.

CRs-Fixed: 664870
Change-Id: If3208d5c0557d3eaeddf875d6c6762bd870c439b
libstagefright: set frame packing from codec config

- From ACodec call to configure codec is triggered but there is no frame
  packing call
- In default configuration, clips may fail if the proper frame packing
  mode is not set
- Codec config and frame packing are currently done in two separate calls.
  Fix is to trigger frame packing from within the codec config call as
  there is no reason to call each separately

Change-Id: I0455d446cd862b5e7373e3bcb9ad4bfdf7826d18
CRs-Fixed: 648894
stagefright: Fix mismerge

Change-Id: I893d4731bb9152c72ee680954efc44693ef49ada