Lines Matching defs:frame_bytes
94 int frame_bytes, i;
123 frame_bytes = end - ptr;
124 if (frame_bytes > MAX_FRAME_SIZE)
127 pkt->frame_size[0] = frame_bytes;
142 frame_bytes = end - ptr;
143 if (frame_bytes & 1 || frame_bytes >> 1 > MAX_FRAME_SIZE)
146 pkt->frame_size[0] = frame_bytes >> 1;
148 pkt->frame_size[1] = frame_bytes >> 1;
156 frame_bytes = xiph_lacing_16bit(&ptr, end);
157 if (frame_bytes < 0)
162 if (len < 0 || len + frame_bytes > end - ptr)
164 end = ptr + frame_bytes + len;
169 pkt->frame_size[0] = frame_bytes;
172 frame_bytes = end - ptr - pkt->frame_size[0];
173 if (frame_bytes < 0 || frame_bytes > MAX_FRAME_SIZE)
176 pkt->frame_size[1] = frame_bytes;
201 frame_bytes = xiph_lacing_16bit(&ptr, end);
202 if (frame_bytes < 0)
204 pkt->frame_size[i] = frame_bytes;
205 total_bytes += frame_bytes;
216 frame_bytes = end - ptr - padding;
217 if (total_bytes > frame_bytes)
222 pkt->frame_size[pkt->frame_count-1] = frame_bytes - total_bytes;
227 frame_bytes = xiph_lacing_16bit(&ptr, end);
228 if (frame_bytes < 0 || pkt->frame_count * frame_bytes + padding > end - ptr)
230 end = ptr + pkt->frame_count * frame_bytes + padding;
233 frame_bytes = end - ptr - padding;
234 if (frame_bytes % pkt->frame_count ||
235 frame_bytes / pkt->frame_count > MAX_FRAME_SIZE)
237 frame_bytes /= pkt->frame_count;
241 pkt->frame_size[0] = frame_bytes;
244 pkt->frame_size[i] = frame_bytes;