Commit 4cbae57c authored by Mans Rullgard's avatar Mans Rullgard

assdec: fix qsort() callback signature

This changes the event_cmp() function to the correct signature,
avoiding an ugly cast.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent 4cd217c0
...@@ -68,8 +68,9 @@ static int64_t get_pts(const uint8_t *p) ...@@ -68,8 +68,9 @@ static int64_t get_pts(const uint8_t *p)
return sec*100+hsec; return sec*100+hsec;
} }
static int event_cmp(uint8_t **a, uint8_t **b) static int event_cmp(const void *_a, const void *_b)
{ {
const uint8_t *const *a = _a, *const *b = _b;
return get_pts(*a) - get_pts(*b); return get_pts(*a) - get_pts(*b);
} }
...@@ -131,7 +132,7 @@ static int read_header(AVFormatContext *s) ...@@ -131,7 +132,7 @@ static int read_header(AVFormatContext *s)
p++; p++;
} }
qsort(ass->event, ass->event_count, sizeof(*ass->event), (void*)event_cmp); qsort(ass->event, ass->event_count, sizeof(*ass->event), event_cmp);
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment