From daa769fea579ed6acaf0120f3aa5d44002ba63bd Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 7 Jul 2025 11:46:44 -0400 Subject: [PATCH] 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 --- daemon/media_player.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon/media_player.c b/daemon/media_player.c index 179276c7a..7fb192357 100644 --- a/daemon/media_player.c +++ b/daemon/media_player.c @@ -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) {