static int srt_get_duration(uint8_t **buf)

{

    int i, duration = 0;



    for (i=0; i<2 && !duration; i++) {

        int s_hour, s_min, s_sec, s_hsec, e_hour, e_min, e_sec, e_hsec;

        if (sscanf(*buf, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d",

                   &s_hour, &s_min, &s_sec, &s_hsec,

                   &e_hour, &e_min, &e_sec, &e_hsec) == 8) {

            s_min  +=   60*s_hour;      e_min  +=   60*e_hour;

            s_sec  +=   60*s_min;       e_sec  +=   60*e_min;

            s_hsec += 1000*s_sec;       e_hsec += 1000*e_sec;

            duration = e_hsec - s_hsec;

        }

        *buf += strcspn(*buf, "\n") + 1;

    }

    return duration;

}

static int srt_get_duration(uint8_t **buf)

{

    int i, duration = 0;



    for (i=0; i<2 && !duration; i++) {

        int s_hour, s_min, s_sec, s_hsec, e_hour, e_min, e_sec, e_hsec;

        if (sscanf(*buf, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d",

                   &s_hour, &s_min, &s_sec, &s_hsec,

                   &e_hour, &e_min, &e_sec, &e_hsec) == 8) {

            s_min  +=   60*s_hour;      e_min  +=   60*e_hour;

            s_sec  +=   60*s_min;       e_sec  +=   60*e_min;

            s_hsec += 1000*s_sec;       e_hsec += 1000*e_sec;

            duration = e_hsec - s_hsec;

        }

        *buf += strcspn(*buf, "\n") + 1;

    }

    return duration;

}

        *buf += strcspn(*buf, "\n") + 1;
static int FUNC_0(uint8_t **VAR_0)

{

    int VAR_1, VAR_2 = 0;



    for (VAR_1=0; VAR_1<2 && !VAR_2; VAR_1++) {

        int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;

        if (sscanf(*VAR_0, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d",

                   &VAR_3, &VAR_4, &VAR_5, &VAR_6,

                   &VAR_7, &VAR_8, &VAR_9, &VAR_10) == 8) {

            VAR_4  +=   60*VAR_3;      VAR_8  +=   60*VAR_7;

            VAR_5  +=   60*VAR_4;       VAR_9  +=   60*VAR_8;

            VAR_6 += 1000*VAR_5;       VAR_10 += 1000*VAR_9;

            VAR_2 = VAR_10 - VAR_6;

        }

        *VAR_0 += strcspn(*VAR_0, "\n") + 1;

    }

    return VAR_2;

}

static int FUNC_0(uint8_t **VAR_0)
{ int VAR_1, VAR_2 = 0; for (VAR_1=0; VAR_1<2 && !VAR_2; VAR_1++) { int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10; if (sscanf(*VAR_0, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d",
&VAR_3, &VAR_4, &VAR_5, &VAR_6,
&VAR_7, &VAR_8, &VAR_9, &VAR_10) == 8) { VAR_4  +=   60*VAR_3;      VAR_8  +=   60*VAR_7; VAR_5  +=   60*VAR_4;       VAR_9  +=   60*VAR_8; VAR_6 += 1000*VAR_5;       VAR_10 += 1000*VAR_9; VAR_2 = VAR_10 - VAR_6; } *VAR_0 += strcspn(*VAR_0, "\n") + 1; } return VAR_2; }