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/utils.c | |
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/utils.c')
-rw-r--r-- | libavcodec/utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index e4ea32523d..034b54a460 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -3034,6 +3034,11 @@ int ff_thread_ref_frame(ThreadFrame *dst, ThreadFrame *src) #if !HAVE_THREADS +enum AVPixelFormat ff_thread_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt) +{ + return avctx->get_format(avctx, fmt); +} + int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags) { f->owner = avctx; |