]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/thread.h
Add thread-safe wrapper for get_format().
[ffmpeg] / libavcodec / thread.h
index 24e62b4967d24b504b4c0e4e78e31a1924f0b111..0dc04e0702169bd5972b6106b97c758588e97555 100644 (file)
@@ -97,6 +97,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).