Revision c25fdfc6 libav/tick.h

View differences:

libav/tick.h
39 39
#endif
40 40
    return n;
41 41
}
42

  
43
static inline INT64 ticker_abs(Ticker *tick, int num)
44
{
45
    INT64 n = (INT64) num * tick->div;
46
    INT64 value = (INT64) num * tick->mod;
47

  
48
    if (value > 0) {
49
        n += (value / tick->inrate);
50
        value = value % tick->inrate;
51
        if (value > 0) {
52
            /* value -= tick->inrate; */
53
            n++;
54
        }
55
    }
56
    return n;
57
}

Also available in: Unified diff