summaryrefslogtreecommitdiff
path: root/libavcodec/msvideo1enc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-26 09:09:44 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-05 03:21:41 +0200
commit5828e8209f48f206c42b69e314a6988b50e98924 (patch)
treeb1ce7a4fdbafb8e2ec3706340736812dae042016 /libavcodec/msvideo1enc.c
parentcee40a945abc3568e270899eefb8bf6cf7e5ab3c (diff)
downloadffmpeg-5828e8209f48f206c42b69e314a6988b50e98924.tar.gz
avcodec: Constify frame->data pointers for encoders where possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/msvideo1enc.c')
-rw-r--r--libavcodec/msvideo1enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/msvideo1enc.c b/libavcodec/msvideo1enc.c
index f14badde21..4e1e94e9ab 100644
--- a/libavcodec/msvideo1enc.c
+++ b/libavcodec/msvideo1enc.c
@@ -69,7 +69,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
{
Msvideo1EncContext * const c = avctx->priv_data;
const AVFrame *p = pict;
- uint16_t *src;
+ const uint16_t *src;
uint8_t *prevptr;
uint8_t *dst, *buf;
int keyframe = 0;
@@ -85,7 +85,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if(!c->prev)
c->prev = av_malloc(avctx->width * 3 * (avctx->height + 3));
prevptr = c->prev + avctx->width * 3 * (FFALIGN(avctx->height, 4) - 1);
- src = (uint16_t*)(p->data[0] + p->linesize[0]*(FFALIGN(avctx->height, 4) - 1));
+ src = (const uint16_t*)(p->data[0] + p->linesize[0]*(FFALIGN(avctx->height, 4) - 1));
if(c->keyint >= avctx->keyint_min)
keyframe = 1;