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>
This commit is contained in:
Anton Khirnov
2021-03-08 11:26:32 +01:00
committed by Andreas Rheinhardt
parent 9c489a0f3a
commit dd846bc4a9
12 changed files with 78 additions and 12 deletions

View File

@@ -455,7 +455,11 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame,
if (!got_frame)
av_frame_unref(frame);
#if FF_API_FLAG_TRUNCATED
if (ret >= 0 && avctx->codec->type == AVMEDIA_TYPE_VIDEO && !(avctx->flags & AV_CODEC_FLAG_TRUNCATED))
#else
if (ret >= 0 && avctx->codec->type == AVMEDIA_TYPE_VIDEO)
#endif
ret = pkt->size;
#if FF_API_AVCTX_TIMEBASE