Skip to content

Commit 8067e43

Browse files
committed
Media (Linux): be compatible with signed media length
Fixes Chrome support
1 parent 61dba1e commit 8067e43

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/detection/media/media_linux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ static bool parseMprisMetadata(FFDBusData* data, DBusMessageIter* rootIterator,
9595
}
9696
}
9797
} else if (ffStrEquals(mpris, "length")) {
98-
uint64_t length = 0; // microseconds
99-
if (ffDBusGetUint(data, &dictIterator, &length)) {
98+
int64_t length = 0; // microseconds
99+
if (ffDBusGetInt(data, &dictIterator, &length) && length > 0) {
100100
result->length = (uint32_t) (length / 1000);
101101
}
102102
}

0 commit comments

Comments
 (0)