Not sure if it needs to be explicitly set to NULL if decoding fails. Leaving it untouched makes certain amount of sense too - as if this header wasn't there at all.