| 1020 | } |
| 1021 | |
| 1022 | static int check_ts_sync(const uint8_t *buf) |
| 1023 | { |
| 1024 | // must have initial sync byte, no scrambling & a legal adaptation ctrl |
| 1025 | return (buf[0] == 0x47) && ((buf[3] >> 6) == 0) && ((buf[3] >> 4) > 0); |
| 1026 | } |
| 1027 | |
| 1028 | static int have_ts_sync(const uint8_t *buf, int psize) |
| 1029 | { |