Lines Matching defs:header
65 * Verify the checksum of an LXF packet header
67 * @param[in] header the packet header to check
70 static int check_checksum(const uint8_t *header, int size)
76 sum += AV_RL32(&header[x]);
82 * Read input until we find the next ident. If found, copy it to the header buffer
84 * @param[out] header where to copy the ident to
87 static int lxf_sync(AVFormatContext *s, uint8_t *header)
103 memcpy(header, LXF_IDENT, LXF_IDENT_LENGTH);
109 * Read and checksum the next packet header
111 * @return the size of the payload following the header or < 0 on failure
120 uint8_t header[LXF_MAX_PACKET_HEADER_SIZE];
121 const uint8_t *p = header + LXF_IDENT_LENGTH;
124 if ((ret = lxf_sync(s, header)) < 0)
127 ret = avio_read(pb, header + LXF_IDENT_LENGTH, 8);
139 av_log(s, AV_LOG_ERROR, "Invalid header size 0x%"PRIx32"\n", header_size);
143 //read the rest of the packet header
144 if ((ret = avio_read(pb, header + (p - header),
145 header_size - (p - header))) !=
146 header_size - (p - header))
149 if (check_checksum(header, header_size))
245 av_log(s, AV_LOG_ERROR, "expected %d B size header, got %d\n",