[FFmpeg-cvslog] fftools/ffmpeg: constify AVSubtitle parameters as appropriate

Anton Khirnov git at videolan.org
Wed May 31 17:26:02 EEST 2023


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue May 23 12:50:19 2023 +0200| [3d35b73b2a40b9e99724401d6390750e2bc65318] | committer: Anton Khirnov

fftools/ffmpeg: constify AVSubtitle parameters as appropriate

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3d35b73b2a40b9e99724401d6390750e2bc65318
---

 fftools/ffmpeg.c | 5 +++--
 fftools/ffmpeg.h | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 0539a45856..9c68add0a4 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -211,7 +211,8 @@ static void sub2video_push_ref(InputStream *ist, int64_t pts)
     }
 }
 
-void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub)
+void sub2video_update(InputStream *ist, int64_t heartbeat_pts,
+                      const AVSubtitle *sub)
 {
     AVFrame *frame = ist->sub2video.frame;
     int8_t *dst;
@@ -754,7 +755,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
     first_report = 0;
 }
 
-static int copy_av_subtitle(AVSubtitle *dst, AVSubtitle *src)
+static int copy_av_subtitle(AVSubtitle *dst, const AVSubtitle *src)
 {
     int ret = AVERROR_BUG;
     AVSubtitle tmp = {
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 8c149f1f95..451d18db6f 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -742,7 +742,8 @@ int init_simple_filtergraph(InputStream *ist, OutputStream *ost,
                             char *graph_desc);
 int init_complex_filtergraph(FilterGraph *fg);
 
-void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub);
+void sub2video_update(InputStream *ist, int64_t heartbeat_pts,
+                      const AVSubtitle *sub);
 
 int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame, int keep_reference);
 int ifilter_send_eof(InputFilter *ifilter, int64_t pts, AVRational tb);



More information about the ffmpeg-cvslog mailing list