mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-18 22:55:12 +08:00
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:

committed by
Andreas Rheinhardt

parent
9c489a0f3a
commit
dd846bc4a9
@@ -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
|
||||
|
Reference in New Issue
Block a user