diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-19 19:41:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-19 19:41:44 +0200 |
commit | 5dfcb4f74de56658b8c733ea27fae3abd07c4c2d (patch) | |
tree | 5cf12fb6f3b881f75ed3c21c8a9949c1453aa879 /libavcodec/flacenc.c | |
parent | 710abaf2c5d8132924f9a1b8486716cdc16d327f (diff) | |
download | ffmpeg-5dfcb4f74de56658b8c733ea27fae3abd07c4c2d.tar.gz |
avcodec/flacenc: Simplify md5 calculation code by using AV_WL24()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/flacenc.c')
-rw-r--r-- | libavcodec/flacenc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index d3f93f959e..16719a985d 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -1278,9 +1278,7 @@ static int update_md5_sum(FlacEncodeContext *s, const void *samples) for (i = 0; i < s->frame.blocksize * s->channels; i++) { int32_t v = samples0[i] >> 8; - *tmp++ = (v ) & 0xFF; - *tmp++ = (v >> 8) & 0xFF; - *tmp++ = (v >> 16) & 0xFF; + AV_WL24(tmp + 3*i, v); } buf = s->md5_buffer; } |