static void writer_print_time(WriterContext *wctx, const char *key,

                              int64_t ts, const AVRational *time_base, int is_duration)

{

    char buf[128];



    if ((!is_duration && ts == AV_NOPTS_VALUE) || (is_duration && ts == 0)) {

        writer_print_string(wctx, key, "N/A", 1);

    } else {

        double d = ts * av_q2d(*time_base);

        struct unit_value uv;

        uv.val.d = d;

        uv.unit = unit_second_str;

        value_string(buf, sizeof(buf), uv);

        writer_print_string(wctx, key, buf, 0);

    }

}

static void writer_print_time(WriterContext *wctx, const char *key,

                              int64_t ts, const AVRational *time_base, int is_duration)

{

    char buf[128];



    if ((!is_duration && ts == AV_NOPTS_VALUE) || (is_duration && ts == 0)) {

        writer_print_string(wctx, key, "N/A", 1);

    } else {

        double d = ts * av_q2d(*time_base);

        struct unit_value uv;

        uv.val.d = d;

        uv.unit = unit_second_str;

        value_string(buf, sizeof(buf), uv);

        writer_print_string(wctx, key, buf, 0);

    }

}

static void FUNC_0(WriterContext *VAR_0, const char *VAR_1,

                              int64_t VAR_2, const AVRational *VAR_3, int VAR_4)

{

    char VAR_5[128];



    if ((!VAR_4 && VAR_2 == AV_NOPTS_VALUE) || (VAR_4 && VAR_2 == 0)) {

        writer_print_string(VAR_0, VAR_1, "N/A", 1);

    } else {

        double VAR_6 = VAR_2 * av_q2d(*VAR_3);

        struct unit_value VAR_7;

        VAR_7.val.VAR_6 = VAR_6;

        VAR_7.unit = unit_second_str;

        value_string(VAR_5, sizeof(VAR_5), VAR_7);

        writer_print_string(VAR_0, VAR_1, VAR_5, 0);

    }

}

static void FUNC_0(WriterContext *VAR_0, const char *VAR_1,
int64_t VAR_2, const AVRational *VAR_3, int VAR_4)
{ char VAR_5[128]; if ((!VAR_4 && VAR_2 == AV_NOPTS_VALUE) || (VAR_4 && VAR_2 == 0)) { writer_print_string(VAR_0, VAR_1, "N/A", 1); } else { double VAR_6 = VAR_2 * av_q2d(*VAR_3); struct unit_value VAR_7; VAR_7.val.VAR_6 = VAR_6; VAR_7.unit = unit_second_str; value_string(VAR_5, sizeof(VAR_5), VAR_7); writer_print_string(VAR_0, VAR_1, VAR_5, 0); } }