[FFmpeg-cvslog] avcodec/threadframe: Constify the frame in ff_thread_await_progress

Andreas Rheinhardt git at videolan.org
Sat Jul 30 23:26:11 EEST 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Jul 22 06:27:05 2022 +0200| [a2d7da01e8f9a2ab5815c0a9718dc952f751667d] | committer: Andreas Rheinhardt

avcodec/threadframe: Constify the frame in ff_thread_await_progress

It is safe to call it on a const ThreadFrame*.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/pthread_frame.c | 2 +-
 libavcodec/threadframe.h   | 2 +-
 libavcodec/utils.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 8faea75a49..a54d16fee4 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -615,7 +615,7 @@ void ff_thread_report_progress(ThreadFrame *f, int n, int field)
     pthread_mutex_unlock(&p->progress_mutex);
 }
 
-void ff_thread_await_progress(ThreadFrame *f, int n, int field)
+void ff_thread_await_progress(const ThreadFrame *f, int n, int field)
 {
     PerThreadContext *p;
     atomic_int *progress = f->progress ? (atomic_int*)f->progress->data : NULL;
diff --git a/libavcodec/threadframe.h b/libavcodec/threadframe.h
index dea4dadc6d..100e068e06 100644
--- a/libavcodec/threadframe.h
+++ b/libavcodec/threadframe.h
@@ -56,7 +56,7 @@ void ff_thread_report_progress(ThreadFrame *f, int progress, int field);
  * @param field The field being referenced, for field-picture codecs.
  * 0 for top field or frame pictures, 1 for bottom field.
  */
-void ff_thread_await_progress(ThreadFrame *f, int progress, int field);
+void ff_thread_await_progress(const ThreadFrame *f, int progress, int field);
 
 /**
  * Wrapper around ff_get_buffer() for frame-multithreaded codecs.
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index cae61d80ff..e73e3a7d08 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -949,7 +949,7 @@ void ff_thread_report_progress(ThreadFrame *f, int progress, int field)
 {
 }
 
-void ff_thread_await_progress(ThreadFrame *f, int progress, int field)
+void ff_thread_await_progress(const ThreadFrame *f, int progress, int field)
 {
 }
 



More information about the ffmpeg-cvslog mailing list