diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-01-09 18:01:02 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-04-10 14:16:39 +0200 |
commit | 665e5b0fba41a8bae2269d9ce8929a24002e5907 (patch) | |
tree | 397136c747d006cdb54f4ff126cdca94f0297f77 /libavcodec/internal.h | |
parent | 7385ffbd31a47a5dd5e66b9d3ba48a4474bbd180 (diff) |
lavc: replace AVCodecInternal.allocate_progress with an internal cap
This is a constant codec property, so a capability flag is more appropriate.
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r-- | libavcodec/internal.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h index bccd9222d4..700807cd75 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -68,6 +68,11 @@ * Codec initializes slice-based threading with a main function */ #define FF_CODEC_CAP_SLICE_THREAD_HAS_MF (1 << 5) +/* + * The codec supports frame threading and has inter-frame dependencies, so it + * uses ff_thread_report/await_progress(). + */ +#define FF_CODEC_CAP_ALLOCATE_PROGRESS (1 << 6) /** * AVCodec.codec_tags termination value @@ -142,21 +147,6 @@ typedef struct AVCodecInternal { int is_copy; /** - * Whether to allocate progress for frame threading. - * - * The codec must set it to 1 if it uses ff_thread_await/report_progress(), - * then progress will be allocated in ff_thread_get_buffer(). The frames - * then MUST be freed with ff_thread_release_buffer(). - * - * If the codec does not need to call the progress functions (there are no - * dependencies between the frames), it should leave this at 0. Then it can - * decode straight to the user-provided frames (which the user will then - * free with av_frame_unref()), there is no need to call - * ff_thread_release_buffer(). - */ - int allocate_progress; - - /** * An audio frame with less than required samples has been submitted and * padded with silence. Reject all subsequent frames. */ |