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:
TheAMM 2021-05-29 00:53:00 +03:00 committed by Jan Ekström
parent 27db175ab6
commit dd9ed47c99
1 changed files with 2 additions and 2 deletions

View File

@ -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;