summaryrefslogtreecommitdiff
path: root/libavcodec/pthread.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-03-08 11:26:32 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-20 00:20:13 +0200
commitdd846bc4a9163f875cc2c4e99325c1a7b4ab8e7d (patch)
tree454f000005c2df2d1c1867239ea50534678b2583 /libavcodec/pthread.c
parent9c489a0f3a954d8b63d0e8dc2a387ff8f2a8aa3a (diff)
lavc: deprecate AV_CODEC_(FLAG|CAP)_TRUNCATED
It is supported only by a few decoders (h263, h263p, mpeg(1|2|)video and mpeg4) and is entirely redundant with parsers. Furthermore, using it leads to missing frames, as flushing the decoder at the end does not work properly. Co-authored-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r--libavcodec/pthread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index e7bad19f8b..5adc3c43a3 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -48,7 +48,9 @@
static void validate_thread_parameters(AVCodecContext *avctx)
{
int frame_threading_supported = (avctx->codec->capabilities & AV_CODEC_CAP_FRAME_THREADS)
+#if FF_API_FLAG_TRUNCATED
&& !(avctx->flags & AV_CODEC_FLAG_TRUNCATED)
+#endif
&& !(avctx->flags & AV_CODEC_FLAG_LOW_DELAY)
&& !(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS);
if (avctx->thread_count == 1) {