summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4videodec.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/mpeg4videodec.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/mpeg4videodec.c')
-rw-r--r--libavcodec/mpeg4videodec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index fcab975a9c..34b050db28 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -3590,8 +3590,10 @@ const AVCodec ff_mpeg4_decoder = {
.close = ff_h263_decode_end,
.decode = ff_h263_decode_frame,
.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
- AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY |
- AV_CODEC_CAP_FRAME_THREADS,
+#if FF_API_FLAG_TRUNCATED
+ AV_CODEC_CAP_TRUNCATED |
+#endif
+ AV_CODEC_CAP_DELAY | AV_CODEC_CAP_FRAME_THREADS,
.caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM |
FF_CODEC_CAP_ALLOCATE_PROGRESS,
.flush = ff_mpeg_flush,