diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2013-04-07 10:17:09 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2013-04-15 09:04:07 +0200 |
commit | c10d498bfd246a40cc7830838b74e18a79418839 (patch) | |
tree | c25fb041eefb1df030268b6bd517b415f7b1f1c8 /libavcodec/thread.h | |
parent | 8067f55edf3719182aed6e5b57b7863889f80218 (diff) | |
download | ffmpeg-c10d498bfd246a40cc7830838b74e18a79418839.tar.gz |
Add thread-safe wrapper for get_format().
Just like get_buffer, get_format should not be called from a different
thread if thread_safe_callbacks is not set.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/thread.h')
-rw-r--r-- | libavcodec/thread.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/thread.h b/libavcodec/thread.h index 24e62b4967..0dc04e0702 100644 --- a/libavcodec/thread.h +++ b/libavcodec/thread.h @@ -98,6 +98,16 @@ void ff_thread_report_progress(ThreadFrame *f, int progress, int field); void ff_thread_await_progress(ThreadFrame *f, int progress, int field); /** + * Wrapper around get_format() for frame-multithreaded codecs. + * Call this function instead of avctx->get_format(). + * Cannot be called after the codec has called ff_thread_finish_setup(). + * + * @param avctx The current context. + * @param fmt The list of available formats. + */ +enum AVPixelFormat ff_thread_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt); + +/** * Wrapper around get_buffer() for frame-multithreaded codecs. * Call this function instead of ff_get_buffer(f). * Cannot be called after the codec has called ff_thread_finish_setup(). |