Browse Source

MT#55283 distinguish player cache ptimes

Add the ptime into the hash function so that cached player using
different ptimes use distinct entries.

Closes #1963

Change-Id: Ib118cd2ce14525d524a2d63c0506af8ae8ae929f
rfuchs/1971
Richard Fuchs 5 months ago
parent
commit
daa769fea5
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      daemon/media_player.c

+ 3
- 0
daemon/media_player.c View File

@ -2053,6 +2053,7 @@ static unsigned int media_player_cache_entry_hash(const struct media_player_cach
}
ret ^= str_hash(&i->dst_pt.encoding_with_full_params);
ret ^= i->index.type;
ret ^= i->dst_pt.ptime;
return ret;
}
static gboolean media_player_cache_entry_eq(const struct media_player_cache_index *a,
@ -2073,6 +2074,8 @@ static gboolean media_player_cache_entry_eq(const struct media_player_cache_inde
default:
abort();
}
if (a->dst_pt.ptime != b->dst_pt.ptime)
return FALSE;
return str_equal(&a->dst_pt.encoding_with_full_params, &b->dst_pt.encoding_with_full_params);
}
static void __media_player_cache_entry_free(struct media_player_cache_entry *e) {


Loading…
Cancel
Save