diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-23 06:15:23 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-31 04:38:20 +0200 |
commit | 597dc96736a960ed95f2cbbf0b32ddad210c7f2a (patch) | |
tree | 42d6f121dacf72f87d468a196e0b1c2631b1d82c /libavcodec/dvdec.c | |
parent | 5ad29e15908523c423c881bce2aaf62e433169b6 (diff) |
avcodec/dvdec: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/dvdec.c')
-rw-r--r-- | libavcodec/dvdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index 4760618a97..f7423580aa 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -345,7 +345,7 @@ static av_always_inline void put_block_8x4(int16_t *block, uint8_t *av_restrict } } -static void dv100_idct_put_last_row_field_chroma(DVVideoContext *s, uint8_t *data, +static void dv100_idct_put_last_row_field_chroma(const DVVideoContext *s, uint8_t *data, int stride, int16_t *blocks) { s->idsp.idct(blocks + 0*64); @@ -357,7 +357,7 @@ static void dv100_idct_put_last_row_field_chroma(DVVideoContext *s, uint8_t *dat put_block_8x4(blocks+1*64 + 4*8, data + 8 + stride, stride<<1); } -static void dv100_idct_put_last_row_field_luma(DVVideoContext *s, uint8_t *data, +static void dv100_idct_put_last_row_field_luma(const DVVideoContext *s, uint8_t *data, int stride, int16_t *blocks) { s->idsp.idct(blocks + 0*64); @@ -378,7 +378,7 @@ static void dv100_idct_put_last_row_field_luma(DVVideoContext *s, uint8_t *data, /* mb_x and mb_y are in units of 8 pixels */ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg) { - DVVideoContext *s = avctx->priv_data; + const DVVideoContext *s = avctx->priv_data; DVwork_chunk *work_chunk = arg; int quant, dc, dct_mode, class1, j; int mb_index, mb_x, mb_y, last_index; |