From a0d542a0daa195fa9780dd734ed13fd2d5bbd383 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 26 May 2015 15:19:56 +0200 Subject: Adjust size of frame number --- reader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reader.c b/reader.c index 15a6289..ba568d4 100644 --- a/reader.c +++ b/reader.c @@ -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 { -- cgit v1.2.1