]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/sha.c
Declare the PIX_FMT_GRAY8 pixel format as a paletted format. This is
[ffmpeg] / libavutil / sha.c
index 3107deeffea65758f7860e24f654df28aec6313f..7fe34007bb064fb393cad4531081bac592007b13 100644 (file)
@@ -25,6 +25,8 @@
 #include "avutil.h"
 #include "bswap.h"
 #include "sha.h"
+#include "sha1.h"
+#include "intreadwrite.h"
 
 /** hash context */
 typedef struct AVSHA {
@@ -319,7 +321,7 @@ void av_sha_final(AVSHA* ctx, uint8_t *digest)
         av_sha_update(ctx, "", 1);
     av_sha_update(ctx, (uint8_t *)&finalcount, 8); /* Should cause a transform() */
     for (i = 0; i < ctx->digest_len; i++)
-        ((uint32_t*)digest)[i] = be2me_32(ctx->state[i]);
+        AV_WB32(digest + i*4, ctx->state[i]);
 }
 
 #if LIBAVUTIL_VERSION_MAJOR < 51