avcodec/flacenc: Simplify md5 calculation code by using AV_WL24()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/137/head
Michael Niedermayer 10 years ago
parent 710abaf2c5
commit 5dfcb4f74d
  1. 4
      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++) { for (i = 0; i < s->frame.blocksize * s->channels; i++) {
int32_t v = samples0[i] >> 8; int32_t v = samples0[i] >> 8;
*tmp++ = (v ) & 0xFF; AV_WL24(tmp + 3*i, v);
*tmp++ = (v >> 8) & 0xFF;
*tmp++ = (v >> 16) & 0xFF;
} }
buf = s->md5_buffer; buf = s->md5_buffer;
} }

Loading…
Cancel
Save