Lines Matching refs:section
49 const char *section;
59 { .section = "Script Info",
69 { .section = "V4+ Styles",
101 { .section = "V4 Styles",
128 { .section = "Events",
215 const ASSSection *section = &ass_sections[ctx->current_section];
216 int *count = (int *)((uint8_t *)&ctx->ass + section->offset_count);
217 void **section_ptr = (void **)((uint8_t *)&ctx->ass + section->offset);
218 uint8_t *tmp = av_realloc_array(*section_ptr, (*count+1), section->size);
222 tmp += *count * section->size;
223 memset(tmp, 0, section->size);
240 static int *get_default_field_orders(const ASSSection *section, int *number)
243 int *order = av_malloc_array(FF_ARRAY_ELEMS(section->fields), sizeof(*order));
247 for (i = 0; section->fields[i].name; i++)
250 while (i < FF_ARRAY_ELEMS(section->fields))
257 const ASSSection *section = &ass_sections[ctx->current_section];
272 (!section->fields_header || strncmp(buf, section->fields_header, len))) {
277 section = &ass_sections[ctx->current_section];
284 if (section->format_header && !order) {
285 len = strlen(section->format_header);
286 if (!strncmp(buf, section->format_header, len) && buf[len] == ':') {
295 for (i=0; section->fields[i].name; i++)
296 if (!strncmp(buf, section->fields[i].name, len)) {
307 if (section->fields_header) {
308 len = strlen(section->fields_header);
309 if (!strncmp(buf, section->fields_header, len) && buf[len] == ':') {
315 order = get_default_field_orders(section, number);
327 ASSFieldType type = section->fields[order[i]].type;
328 ptr = struct_ptr + section->fields[order[i]].offset;
339 for (i=0; section->fields[i].name; i++)
340 if (!strncmp(buf, section->fields[i].name, len)) {
341 ASSFieldType type = section->fields[i].type;
342 uint8_t *ptr = (uint8_t *)&ctx->ass + section->offset;
343 ptr += section->fields[i].offset;
359 char c, section[16];
366 if (sscanf(buf, "[%15[0-9A-Za-z+ ]]%c", section, &c) == 2) {
370 if (!strcmp(section, ass_sections[i].section)) {
397 static void free_section(ASSSplitContext *ctx, const ASSSection *section)
399 uint8_t *ptr = (uint8_t *)&ctx->ass + section->offset;
402 if (section->format_header) {
404 count = (int *)((uint8_t *)&ctx->ass + section->offset_count);
409 for (i=0; i<*count; i++, ptr += section->size)
410 for (j=0; section->fields[j].name; j++) {
411 const ASSFields *field = §ion->fields[j];
417 if (section->format_header)
418 av_freep((uint8_t *)&ctx->ass + section->offset);