diff options
author | Harald Welte <laforge@osmocom.org> | 2019-12-21 22:12:46 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2019-12-21 22:12:46 +0100 |
commit | 13d0a961fff1aaccf2071d5749aae66779dbab3e (patch) | |
tree | 5bc3599bc4d9e990f076ae64dd08559ca6a70096 | |
parent | c18e7e896f13dd67be9128ce5197f9522e73598a (diff) |
e1: ensure_alignment(): search only in last 512 bytes (32 frames)
-rw-r--r-- | sam/applications/sam_e1/e1_ssc_tc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sam/applications/sam_e1/e1_ssc_tc.c b/sam/applications/sam_e1/e1_ssc_tc.c index 02b8ac0e..c67173b8 100644 --- a/sam/applications/sam_e1/e1_ssc_tc.c +++ b/sam/applications/sam_e1/e1_ssc_tc.c @@ -112,7 +112,7 @@ static void ensure_alignment(struct ssc_buffer *buf) { unsigned int i; /* check every second TS0 byte for FAS symbol (G.704 Section 2.3) */ - for (i = 512; i < sizeof(buf->buffer); i += 32*2) { + for (i = sizeof(buf->buffer)-512; i < sizeof(buf->buffer); i += 32*2) { if ((buf->buffer[i] & 0x7f) != 0x1b) { e1_tc_align_increment(); return; |