avcodec/flacenc: Simplify md5 calculation code by using AV_WL24()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
710abaf2c5
commit
5dfcb4f74d
@ -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…
x
Reference in New Issue
Block a user