Originally committed as revision 21754 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -25,6 +25,7 @@ |
| 25 | 25 |
#include "avutil.h" |
| 26 | 26 |
#include "bswap.h" |
| 27 | 27 |
#include "sha.h" |
| 28 |
+#include "intreadwrite.h" |
|
| 28 | 29 |
|
| 29 | 30 |
/** hash context */ |
| 30 | 31 |
typedef struct AVSHA {
|
| ... | ... |
@@ -319,7 +320,7 @@ void av_sha_final(AVSHA* ctx, uint8_t *digest) |
| 319 | 319 |
av_sha_update(ctx, "", 1); |
| 320 | 320 |
av_sha_update(ctx, (uint8_t *)&finalcount, 8); /* Should cause a transform() */ |
| 321 | 321 |
for (i = 0; i < ctx->digest_len; i++) |
| 322 |
- ((uint32_t*)digest)[i] = be2me_32(ctx->state[i]); |
|
| 322 |
+ AV_WN32(digest + i*4, be2me_32(ctx->state[i])); |
|
| 323 | 323 |
} |
| 324 | 324 |
|
| 325 | 325 |
#if LIBAVUTIL_VERSION_MAJOR < 51 |