Fix incorrect decoding of PAT

PID was decoded incorrectly and the number of programs detected in the
PAT was wrong.