The same h264 stream was sent by IP packets to MSDK decoder. Every IP packet includes one h264 frame. DecodeHeader is used to initialize the decoder and is called in loop to wait having enough h264 stream data. But DecodeHeader returns MFX_ERR_UNKNOWN sometime. In order to avoid data corrupted due to transimission, I recorded h264 stream once MFX_ERR_UNKNOWN is returned. And then compared it with the h264 stream in which DecodeHeader return MFX_ERR_NONE byte by byte. No difference, except lengths are different, and the longer one returns MFX_ERR_UNKNOWN. Please see the attached binary and ascii files. The names ending with "+" represents good case.
My enviorment: Win8 64bit, Intel Media SDK 2012 R3, Ivy Bridge i7-3770, graphics driver v18.104.22.16857.
My questions are
- what are reasons causing DecodeHeader works unstably? Besides mfxBitStream, DecodeHeader has another argument mfxVideoParam.
- Once DecodeHeader returns MFX_ERR_UNKNOWN, should to reset decoder itself. Our observation is once this case happens, the decoder cannot be initialized properly even adding new data.
Thanks in advance.