mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 09:12:33 +00:00
avcodec/v210dec: Don't cast const away
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
74375305ef
commit
2f9a33995a
@ -33,7 +33,7 @@
|
||||
|
||||
typedef struct ThreadData {
|
||||
AVFrame *frame;
|
||||
uint8_t *buf;
|
||||
const uint8_t *buf;
|
||||
int stride;
|
||||
} ThreadData;
|
||||
|
||||
@ -111,7 +111,7 @@ static int v210_decode_slice(AVCodecContext *avctx, void *arg, int jobnr, int th
|
||||
int stride = td->stride;
|
||||
int slice_start = (avctx->height * jobnr) / s->thread_count;
|
||||
int slice_end = (avctx->height * (jobnr+1)) / s->thread_count;
|
||||
uint8_t *psrc = td->buf + stride * slice_start;
|
||||
const uint8_t *psrc = td->buf + stride * slice_start;
|
||||
int16_t *py = (uint16_t*)frame->data[0] + slice_start * frame->linesize[0] / 2;
|
||||
int16_t *pu = (uint16_t*)frame->data[1] + slice_start * frame->linesize[1] / 2;
|
||||
int16_t *pv = (uint16_t*)frame->data[2] + slice_start * frame->linesize[2] / 2;
|
||||
@ -191,7 +191,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic,
|
||||
|
||||
if (stride) {
|
||||
td.stride = stride;
|
||||
td.buf = (uint8_t*)psrc;
|
||||
td.buf = psrc;
|
||||
td.frame = pic;
|
||||
avctx->execute2(avctx, v210_decode_slice, &td, NULL, s->thread_count);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user