This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit c40a8a235bb8d4d599916dae98c01b18f73e53a1 Author: Andreas Rheinhardt <[email protected]> AuthorDate: Mon Aug 17 03:56:47 2026 +0200 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Thu Aug 27 00:11:44 2026 +0200 avformat/shared: Don't log incomplete lines Incomplete lines (without \n) may be torn apart by av_log()s from other threads. So log them once. Also use ff_data_to_hex() for the data->hex conversion. Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavformat/shared.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/libavformat/shared.c b/libavformat/shared.c index 5fd01b185e..fbe86ff1dc 100644 --- a/libavformat/shared.c +++ b/libavformat/shared.c @@ -32,6 +32,7 @@ #include "libavutil/opt.h" #include "libavutil/time.h" +#include "internal.h" #include "url.h" #include <errno.h> @@ -519,13 +520,14 @@ static int spacemap_init(URLContext *h, const uint8_t hash[HASH_SIZE]) ret = set_once_uchar(&s->spacemap->hash[i], hash[i]); if (ret < 0) { av_log(h, AV_LOG_ERROR, "Shared cache spacemap hash mismatch!\n"); - av_log(h, AV_LOG_ERROR, " Expected hash: "); - for (int j = 0; j < 32; j++) - av_log(h, AV_LOG_ERROR, "%02X", hash[j]); - av_log(h, AV_LOG_ERROR, "\n Got hash: "); - for (int j = 0; j < 32; j++) - av_log(h, AV_LOG_ERROR, "%02X", atomic_load(&s->spacemap->hash[j])); - av_log(h, AV_LOG_ERROR, "\n"); + char hash_hex[2 * HASH_SIZE + 1]; + ff_data_to_hex(hash_hex, hash, HASH_SIZE, 0); + av_log(h, AV_LOG_ERROR, " Expected hash: %s\n", hash_hex); + uint8_t hash2[HASH_SIZE]; + for (int j = 0; j < HASH_SIZE; ++j) + hash2[j] = atomic_load_explicit(&s->spacemap->hash[j], memory_order_relaxed); + ff_data_to_hex(hash_hex, hash2, HASH_SIZE, 0); + av_log(h, AV_LOG_ERROR, " Got hash: %s\n", hash_hex); return ret; } } -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
