add protection for decoder and data format

add protection for decoder, and add data format set.
see:
https://rbcommons.com/s/OpenH264/r/831/