Adding error handling and protection when vaInitialize fail.

BZ: 53697

vaInitialize may return a fail value rarely.It can cause mediaserver died.
So, we need adding some error handling and protectionwhen va initialize failure.
Add a variable to flag vaInitialize is successful or not.If not, it will marked as false.
Before starting encoding,check this variable.
If it is false, reture a error code toOMX Component and stop encoding.

Change-Id: I335d21e36c77b5978fa2db978699b6068c8401ed
Signed-off-by: Liu Bolun <bolunx.liu@intel.com>
Reviewed-on: http://android.intel.com:8080/63634
Reviewed-by: Wang, Elaine <elaine.wang@intel.com>
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
2 files changed