diff mbox series

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

Message ID AM7PR03MB6660071C9F7B79F0A1A37A8D8F269@AM7PR03MB6660.eurprd03.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,v2,01/69] avcodec/avcodec: Avoid MpegEncContext in AVHWAccel.decode_mb | expand

Commit Message

Andreas Rheinhardt Feb. 1, 2022, 1:06 p.m. UTC
Also do the same for update_duplicate_context_after_me()
in mpegvideo_enc.c.

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

Patch

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);