[OMX] Split packet decoding into functions