From a7744f15a7667f056945b6b4946dd4afc0be9177 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 11 Sep 2019 00:04:29 +1000 Subject: [PATCH] use integer bytes for hash rather than string --- app/node/input/media/media.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/node/input/media/media.cpp b/app/node/input/media/media.cpp index 341fa86cd..37c6511d0 100644 --- a/app/node/input/media/media.cpp +++ b/app/node/input/media/media.cpp @@ -106,7 +106,15 @@ void MediaInput::Hash(QCryptographicHash *hash, NodeOutput *from, const rational // Use frame value from Decoder if (from == texture_output_ && SetupDecoder()) { - hash->addData(QString::number(decoder_->GetTimestampFromTime(time)).toUtf8()); + int64_t timestamp = decoder_->GetTimestampFromTime(time); + + qDebug() << "Hashed timestamp" << timestamp; + + QByteArray pts_bytes; + pts_bytes.resize(sizeof(int64_t)); + memcpy(pts_bytes.data(), ×tamp, sizeof(int64_t)); + + hash->addData(pts_bytes); // FIXME: Add OCIO data // FIXME: Add alpha association value }