diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-01 15:15:09 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-05-02 05:14:42 +0200 |
commit | 834ef6f4a9af80f8a9b0029c03a9b9e12bb36acc (patch) | |
tree | efccb3b81d0a3c28f19516ae6435574763945003 | |
parent | 2a4cedace4d440978aa10757644f2f0f7a80be2f (diff) | |
download | ffmpeg-834ef6f4a9af80f8a9b0029c03a9b9e12bb36acc.tar.gz |
avcodec/dvbsubdec: Add const where appropriate
These pointers sometimes point to static storage (namely to
default_clut), so adding const to the pointed-to type is important to
ensure that one does not accidentally modify something that is not owned
by a single AVCodecContext.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r-- | libavcodec/dvbsubdec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index f33744df0f..0cbfefcd36 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -724,8 +724,8 @@ static int save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_ou DVBSubDisplayDefinition *display_def = ctx->display_definition; DVBSubRegion *region; AVSubtitleRect *rect; - DVBSubCLUT *clut; - uint32_t *clut_table; + const DVBSubCLUT *clut; + const uint32_t *clut_table; int i; int offset_x=0, offset_y=0; int ret = 0; @@ -1443,8 +1443,8 @@ static int save_display_set(DVBSubContext *ctx) { DVBSubRegion *region; DVBSubRegionDisplay *display; - DVBSubCLUT *clut; - uint32_t *clut_table; + const DVBSubCLUT *clut; + const uint32_t *clut_table; int x_pos, y_pos, width, height; int x, y, y_off, x_off; uint32_t *pbuf; |