diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-05-26 15:19:56 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-05-26 15:19:56 +0200 |
commit | a0d542a0daa195fa9780dd734ed13fd2d5bbd383 (patch) | |
tree | 35b2473a3270fc39138cb4fd6a457d24a1760445 | |
parent | 56687fc6c32b06c6e726bf776e21d62753bf3442 (diff) | |
download | ipecamera-a0d542a0daa195fa9780dd734ed13fd2d5bbd383.tar.gz ipecamera-a0d542a0daa195fa9780dd734ed13fd2d5bbd383.tar.bz2 ipecamera-a0d542a0daa195fa9780dd734ed13fd2d5bbd383.tar.xz ipecamera-a0d542a0daa195fa9780dd734ed13fd2d5bbd383.zip |
Adjust size of frame number
-rw-r--r-- | reader.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -134,10 +134,11 @@ static int ipecamera_data_callback(void *user, pcilib_dma_flags_t flags, size_t #endif /* IPECAMERA_BUG_INCOMPLETE_PACKETS */ if ((bufsize >= 8)&&(!memcmp(buf, frame_magic, sizeof(frame_magic)))) { + // size_t first_line = ((uint32_t*)buf)[4] & 0x7FF; size_t n_lines = ((uint32_t*)buf)[5] & 0x7FF; ipecamera_compute_buffer_size(ctx, n_lines); - ctx->frame[ctx->buffer_pos].event.info.seqnum = ((uint32_t*)buf)[6] & 0x1FFFFFF; + ctx->frame[ctx->buffer_pos].event.info.seqnum = ((uint32_t*)buf)[6] & 0xFFFFFF; ctx->frame[ctx->buffer_pos].event.info.offset = (((uint32_t*)buf)[7] & 0xFFFFFF) * 80; gettimeofday(&ctx->frame[ctx->buffer_pos].event.info.timestamp, NULL); } else { |