Lines Matching refs:frame_bytes
98 int frame_bytes, i;
127 frame_bytes = end - ptr;
128 if (frame_bytes > MAX_FRAME_SIZE)
131 pkt->frame_size[0] = frame_bytes;
146 frame_bytes = end - ptr;
147 if (frame_bytes & 1 || frame_bytes >> 1 > MAX_FRAME_SIZE)
150 pkt->frame_size[0] = frame_bytes >> 1;
152 pkt->frame_size[1] = frame_bytes >> 1;
160 frame_bytes = xiph_lacing_16bit(&ptr, end);
161 if (frame_bytes < 0)
166 if (len < 0 || len + frame_bytes > end - ptr)
168 end = ptr + frame_bytes + len;
173 pkt->frame_size[0] = frame_bytes;
176 frame_bytes = end - ptr - pkt->frame_size[0];
177 if (frame_bytes < 0 || frame_bytes > MAX_FRAME_SIZE)
180 pkt->frame_size[1] = frame_bytes;
205 frame_bytes = xiph_lacing_16bit(&ptr, end);
206 if (frame_bytes < 0)
208 pkt->frame_size[i] = frame_bytes;
209 total_bytes += frame_bytes;
220 frame_bytes = end - ptr - padding;
221 if (total_bytes > frame_bytes)
226 pkt->frame_size[pkt->frame_count-1] = frame_bytes - total_bytes;
231 frame_bytes = xiph_lacing_16bit(&ptr, end);
232 if (frame_bytes < 0 || pkt->frame_count * frame_bytes + padding > end - ptr)
234 end = ptr + pkt->frame_count * frame_bytes + padding;
237 frame_bytes = end - ptr - padding;
238 if (frame_bytes % pkt->frame_count ||
239 frame_bytes / pkt->frame_count > MAX_FRAME_SIZE)
241 frame_bytes /= pkt->frame_count;
245 pkt->frame_size[0] = frame_bytes;
248 pkt->frame_size[i] = frame_bytes;