[FFmpeg-cvslog] avcodec/flacenc: Simplify md5 calculation code by using AV_WL24()
Michael Niedermayer
git at videolan.org
Tue May 19 19:54:55 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue May 19 19:41:44 2015 +0200| [5dfcb4f74de56658b8c733ea27fae3abd07c4c2d] | committer: Michael Niedermayer
avcodec/flacenc: Simplify md5 calculation code by using AV_WL24()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5dfcb4f74de56658b8c733ea27fae3abd07c4c2d
---
libavcodec/flacenc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index d3f93f9..16719a9 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;
}
More information about the ffmpeg-cvslog
mailing list