| 285 | } |
| 286 | |
| 287 | void avtext_print_integer(AVTextFormatContext *tctx, const char *key, int64_t val, int flags) |
| 288 | { |
| 289 | av_assert0(tctx); |
| 290 | |
| 291 | if (tctx->opts.show_optional_fields == SHOW_OPTIONAL_FIELDS_NEVER) |
| 292 | return; |
| 293 | |
| 294 | if (tctx->opts.show_optional_fields == SHOW_OPTIONAL_FIELDS_AUTO |
| 295 | && (flags & AV_TEXTFORMAT_PRINT_STRING_OPTIONAL) |
| 296 | && !(tctx->formatter->flags & AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS)) |
| 297 | return; |
| 298 | |
| 299 | av_assert0(key && tctx->level >= 0 && tctx->level < SECTION_MAX_NB_LEVELS); |
| 300 | |
| 301 | if (!tctx->opts.is_key_selected || tctx->opts.is_key_selected(tctx, key)) { |
| 302 | tctx->formatter->print_integer(tctx, key, val); |
| 303 | tctx->nb_item[tctx->level]++; |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | static inline int validate_string(AVTextFormatContext *tctx, char **dstp, const char *src) |
| 308 | { |