mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 02:20:07 +01:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user