FLAC coded file does not play (single metadata block files)

FLAC files which has the last metadata block flag set in
STREAMINFO were not playing. Sniff of FLAC is modified to
accomodate this set flag.

Change-Id: I76f216cc2cde6e10958324afbc704fc3e5a0e2bf
Author: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 32421
avcenc: Update video port parameters in the base class

This makes sure that the right parameters are returned on both
input and output ports if queried after setting.

This also makes sure that the output MediaFormat from the
MediaCodec class contains the right video size.

Change-Id: I0667b3b4c6bb90331ad0ae7d51388e1bca3d1bbd
Fix SIGABRT when playing mp4 file

If the track duration was shorter than the segment duration, the calculated
encoder padding would be negative, resulting in a crash.
b/11823061
https://code.google.com/p/android/issues/detail?id=62610

Change-Id: I3989ad88caea38d212b61355c15aec13382c6116