diff options
author | TheAMM <the.actual.amm@gmail.com> | 2021-05-29 00:53:00 +0300 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2021-07-08 12:44:06 +0300 |
commit | dd9ed47c996a4e37b2ac529390ba133b62fb204a (patch) | |
tree | a910113a6cb14559a01b222e2ceedb5c29d15128 /demux | |
parent | 27db175ab6ba4f821d92fff3c2d6186b91fe567a (diff) | |
download | mpv-dd9ed47c996a4e37b2ac529390ba133b62fb204a.tar.bz2 mpv-dd9ed47c996a4e37b2ac529390ba133b62fb204a.tar.xz |
demux, dump-cache: fix demux cache range sorting
dump_cache() calls qsort() to order an array of pointers, while the
comparator forgets it's receiving pointers to pointers.
Since cache-dumping over multiple cache ranges is fairly rare, this
seems to have gone unnoticed.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/demux/demux.c b/demux/demux.c index 53ad455b46..980f4a35d6 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -4166,8 +4166,8 @@ static void dumper_close(struct demux_internal *in) static int range_time_compare(const void *p1, const void *p2) { - struct demux_cached_range *r1 = (void *)p1; - struct demux_cached_range *r2 = (void *)p2; + struct demux_cached_range *r1 = *((struct demux_cached_range **)p1); + struct demux_cached_range *r2 = *((struct demux_cached_range **)p2); if (r1->seek_start == r2->seek_start) return 0; |