libstagefright: getHFRRatio should return 1 by default

This fixes camera crashes from divide-by-zero. Also, replaced the
workaround introduced in 1b7ac643d2 by a proper fix.

On ENABLE_AV_ENHANCEMENTS path, getHFRRatio returns 1 when 0 is
detected, thus the default value should be 1 not 0. (1 will turn
all multiplication and division into no-op.)

Change-Id: I5020f461011d5903a5d9bea910e11a4af9948e7f
Revert "libstagefright: set frame packing from codec config"

 * With Venus 1.6, this patch causes the decoder to freeze
   during a new CTS case. Since we aren't using frame packing
   anyway, revert this.

This reverts commit 8356ac84fa349554006dfb6696365794a7d3a204.

Change-Id: I661c84727976aab8a81824279ee1a2fefdd5f8a3
mediaplayerservice: Untangle legacy callback function

Change-Id: Ie0e3c02a9446a5898ae56453d40a144202de40e3
Fix aac decoder flush

b/8543366

Change-Id: I746ffed6289486b802a2292bfc492ea6c780ed0b
Can't play AAC file with ID3 tag.

When the file is scanned, the ID3 tag is found to have a
footer at the end of audio data. And getAdtsFrameLength
return zero after reading the footer. As a result, the
duration and mInitCheck are not set. The current change
considers the data till footer and sets the duration based
on no. of frames read till the footer/corrupt frame.

Change-Id: Ie8f898435f0d4ca31fdd355146c4db7b37c0b988
Signed-off-by: Arulselvan M <arulselvan.m@intel.com>
Signed-off-by: Jin Wei <wei.a.jin@intel.com>