X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fthread.h;h=413196269f59dc007b3db4a0f36e8c267ecce3b0;hb=e83717e63eab1f1b78dc0990e5b8e927097fca29;hp=540135fbc922ea3e59daaed095cdb520ef9349ea;hpb=217ad40aef9eeeff4e805dec3e980fb16aec3345;p=ffmpeg diff --git a/libavcodec/thread.h b/libavcodec/thread.h index 540135fbc92..413196269f5 100644 --- a/libavcodec/thread.h +++ b/libavcodec/thread.h @@ -96,6 +96,7 @@ void ff_thread_report_progress(ThreadFrame *f, int progress, int field); */ void ff_thread_await_progress(ThreadFrame *f, int progress, int field); +#if FF_API_THREAD_SAFE_CALLBACKS /** * Wrapper around get_format() for frame-multithreaded codecs. * Call this function instead of avctx->get_format(). @@ -105,6 +106,9 @@ void ff_thread_await_progress(ThreadFrame *f, int progress, int field); * @param fmt The list of available formats. */ enum AVPixelFormat ff_thread_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt); +#else +#define ff_thread_get_format ff_get_format +#endif /** * Wrapper around get_buffer() for frame-multithreaded codecs. @@ -129,7 +133,7 @@ int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags); */ void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f); -int ff_thread_ref_frame(ThreadFrame *dst, ThreadFrame *src); +int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src); int ff_thread_init(AVCodecContext *s); int ff_slice_thread_execute_with_mainfunc(AVCodecContext *avctx,