mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
27db175ab6
commit
dd9ed47c99
|
@ -4166,8 +4166,8 @@ static void dumper_close(struct demux_internal *in)
|
||||||
|
|
||||||
static int range_time_compare(const void *p1, const void *p2)
|
static int range_time_compare(const void *p1, const void *p2)
|
||||||
{
|
{
|
||||||
struct demux_cached_range *r1 = (void *)p1;
|
struct demux_cached_range *r1 = *((struct demux_cached_range **)p1);
|
||||||
struct demux_cached_range *r2 = (void *)p2;
|
struct demux_cached_range *r2 = *((struct demux_cached_range **)p2);
|
||||||
|
|
||||||
if (r1->seek_start == r2->seek_start)
|
if (r1->seek_start == r2->seek_start)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue