diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-03-08 11:26:32 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-20 00:20:13 +0200 |
commit | dd846bc4a9163f875cc2c4e99325c1a7b4ab8e7d (patch) | |
tree | 454f000005c2df2d1c1867239ea50534678b2583 /libavcodec/decode.c | |
parent | 9c489a0f3a954d8b63d0e8dc2a387ff8f2a8aa3a (diff) | |
download | ffmpeg-dd846bc4a9163f875cc2c4e99325c1a7b4ab8e7d.tar.gz |
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/decode.c')
-rw-r--r-- | libavcodec/decode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 643f9d6a30..023dd3c0b2 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -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 |