diff options
Diffstat (limited to 'libavformat/nut.c')
-rw-r--r-- | libavformat/nut.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libavformat/nut.c b/libavformat/nut.c index c6fdb0bff8..41e51df837 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -237,14 +237,16 @@ int64_t ff_lsb2full(StreamContext *stream, int64_t lsb) return ((lsb - delta) & mask) + delta; } -int ff_nut_sp_pos_cmp(const Syncpoint *a, const Syncpoint *b) +int ff_nut_sp_pos_cmp(const void *a, const void *b) { - return ((a->pos - b->pos) >> 32) - ((b->pos - a->pos) >> 32); + const Syncpoint *va = a, *vb = b; + return ((va->pos - vb->pos) >> 32) - ((vb->pos - va->pos) >> 32); } -int ff_nut_sp_pts_cmp(const Syncpoint *a, const Syncpoint *b) +int ff_nut_sp_pts_cmp(const void *a, const void *b) { - return ((a->ts - b->ts) >> 32) - ((b->ts - a->ts) >> 32); + const Syncpoint *va = a, *vb = b; + return ((va->ts - vb->ts) >> 32) - ((vb->ts - va->ts) >> 32); } int ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts) @@ -263,7 +265,7 @@ int ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts) sp->pos = pos; sp->back_ptr = back_ptr; sp->ts = ts; - av_tree_insert(&nut->syncpoints, sp, (void *) ff_nut_sp_pos_cmp, &node); + av_tree_insert(&nut->syncpoints, sp, ff_nut_sp_pos_cmp, &node); if (node) { av_free(sp); av_free(node); |