| 246 | |
| 247 | |
| 248 | void avtext_print_section_header(AVTextFormatContext *tctx, const void *data, int section_id) |
| 249 | { |
| 250 | if (section_id < 0 || section_id >= tctx->nb_sections) { |
| 251 | av_log(tctx, AV_LOG_ERROR, "Invalid section_id for section_header: %d\n", section_id); |
| 252 | return; |
| 253 | } |
| 254 | |
| 255 | tctx->level++; |
| 256 | av_assert0(tctx->level < SECTION_MAX_NB_LEVELS); |
| 257 | |
| 258 | tctx->nb_item[tctx->level] = 0; |
| 259 | memset(tctx->nb_item_type[tctx->level], 0, sizeof(tctx->nb_item_type[tctx->level])); |
| 260 | tctx->section[tctx->level] = &tctx->sections[section_id]; |
| 261 | |
| 262 | if (tctx->formatter->print_section_header) |
| 263 | tctx->formatter->print_section_header(tctx, data); |
| 264 | } |
| 265 | |
| 266 | void avtext_print_section_footer(AVTextFormatContext *tctx) |
| 267 | { |
no test coverage detected