mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
lavc/svq3: Do not write into memory defined as const.
Fixes a warning on ppc: libavcodec/svq3.c:1055:21: warning: passing argument 1 of ‘av_write_bswap32’ discards 'const' qualifier from pointer target type
This commit is contained in:
parent
78e884f3fb
commit
55bdee7b07
@ -1048,12 +1048,12 @@ static int svq3_decode_slice_header(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
memcpy(s->slice_buf, s->gb.buffer + s->gb.index / 8, slice_bytes);
|
memcpy(s->slice_buf, s->gb.buffer + s->gb.index / 8, slice_bytes);
|
||||||
|
|
||||||
|
if (s->watermark_key) {
|
||||||
|
uint32_t header = AV_RL32(&s->slice_buf[1]);
|
||||||
|
AV_WL32(&s->slice_buf[1], header ^ s->watermark_key);
|
||||||
|
}
|
||||||
init_get_bits(&s->gb_slice, s->slice_buf, slice_bits);
|
init_get_bits(&s->gb_slice, s->slice_buf, slice_bits);
|
||||||
|
|
||||||
if (s->watermark_key) {
|
|
||||||
uint32_t header = AV_RL32(&s->gb_slice.buffer[1]);
|
|
||||||
AV_WL32(&s->gb_slice.buffer[1], header ^ s->watermark_key);
|
|
||||||
}
|
|
||||||
if (length > 0) {
|
if (length > 0) {
|
||||||
memmove(s->slice_buf, &s->slice_buf[slice_length], length - 1);
|
memmove(s->slice_buf, &s->slice_buf[slice_length], length - 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user