[FFmpeg-devel] [PATCH v2 55/69] avcodec/mpegvideo: Constify src of ff_update_duplicate_context()

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Feb 1 15:06:52 EET 2022


Also do the same for update_duplicate_context_after_me()
in mpegvideo_enc.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/mpegvideo.c     | 2 +-
 libavcodec/mpegvideo.h     | 2 +-
 libavcodec/mpegvideo_enc.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 5a68a7cf07..b71e12c3d9 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -469,7 +469,7 @@ static void backup_duplicate_context(MPVContext *bak, MPVContext *src)
 #undef COPY
 }
 
-int ff_update_duplicate_context(MPVContext *dst, MPVContext *src)
+int ff_update_duplicate_context(MPVContext *dst, const MPVContext *src)
 {
     MPVContext bak;
     int i, ret;
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index a379f65143..cb947ff56b 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -545,7 +545,7 @@ void ff_mpv_reconstruct_mb(MPVContext *s, int16_t block[12][64]);
 
 void ff_clean_intra_table_entries(MPVContext *s);
 
-int ff_update_duplicate_context(MPVContext *dst, MPVContext *src);
+int ff_update_duplicate_context(MPVContext *dst, const MPVContext *src);
 void ff_set_qscale(MPVContext *s, int qscale);
 
 void ff_mpv_idct_init(MPVContext *s);
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 4dafc68cdd..6c40bdb39e 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -252,7 +252,7 @@ void ff_init_qscale_tab(MPVMainEncContext *m)
 }
 
 static void update_duplicate_context_after_me(MPVEncContext *dst,
-                                              MPVEncContext *src)
+                                              const MPVEncContext *src)
 {
 #define COPY(a) dst->a= src->a
     COPY(pict_type);
-- 
2.32.0



More information about the ffmpeg-devel mailing list