[port from R42TW] Fix race condition for frame type judging

BZ: 137717

When start encoding frame, if at this time, user send IDR request,
it is possible to have race condition for frame type, so re-calculate
in sendEncodeCommand

Change-Id: Iddf6b6569bc9f85efda8cc3372d2e65c699e3021
Signed-off-by: Zhao Liang <leo.zhao@intel.com>
Reviewed-on: http://android.intel.com:8080/130948
Tested-by: Ding, Haitao <haitao.ding@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
Reviewed-on: http://android.intel.com:8080/140121
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
1 file changed