Up until now, the bsf errored out with a message that there were too many invisible frames if there were already seven frames cached even when the new frame was not invisible. This has been changed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> --- libavcodec/vp9_superframe_bsf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c index a8b58a7fd3..a7faad3abf 100644 --- a/libavcodec/vp9_superframe_bsf.c +++ b/libavcodec/vp9_superframe_bsf.c @@ -158,13 +158,15 @@ static int vp9_superframe_filter(AVBSFContext *ctx, AVPacket *pkt) } else if ((!invisible || uses_superframe_syntax) && !s->n_cache) { // passthrough return 0; - } else if (s->n_cache + 1 >= MAX_CACHE) { + } else if (invisible && s->n_cache + 1 >= MAX_CACHE) { av_log(ctx, AV_LOG_ERROR, "Too many invisible frames\n"); res = AVERROR_INVALIDDATA; goto done; } + av_assert0(s->n_cache < MAX_CACHE); + av_packet_move_ref(s->cache[s->n_cache++], pkt); if (invisible) { -- 2.20.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".