| 486 | } |
| 487 | |
| 488 | void avtext_print_time(AVTextFormatContext *tctx, const char *key, |
| 489 | int64_t ts, const AVRational *time_base, int is_duration) |
| 490 | { |
| 491 | if ((!is_duration && ts == AV_NOPTS_VALUE) || (is_duration && ts == 0)) { |
| 492 | avtext_print_string(tctx, key, "N/A", AV_TEXTFORMAT_PRINT_STRING_OPTIONAL); |
| 493 | } else { |
| 494 | char buf[128]; |
| 495 | double d = av_q2d(*time_base) * ts; |
| 496 | struct unit_value uv; |
| 497 | uv.val.d = d; |
| 498 | uv.unit = unit_second_str; |
| 499 | value_string(tctx, buf, sizeof(buf), uv); |
| 500 | avtext_print_string(tctx, key, buf, 0); |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | void avtext_print_ts(AVTextFormatContext *tctx, const char *key, int64_t ts, int is_duration) |
| 505 | { |
nothing calls this directly
no test coverage detected