refactor a function for further strategy adjustment
add protection for decoder and data format
Merge pull request #1378 from sijchen/ref_refac22

[Encoder] Refactor a function for further strategy adjustment
Merge pull request #1382 from huili2/dataformat_bugfix

add protection for decoder and data format
Merge branch 'master' of https://github.com/cisco/openh264 into modi_stra21

Conflicts:
	codec/encoder/core/src/ref_list_mgr_svc.cpp