h264_redundant_pps: Fix looping over an access unit's units

When looping over an access unit's units in positive direction and
deleting some of them, one needs to make sure that a unit that is at
the position of a unit that just got deleted gets checked, too.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2019-06-20 01:45:04 +02:00 committed by Mark Thompson
parent d78553cc4c
commit 9362f1a982
1 changed files with 2 additions and 0 deletions

View File

@ -97,6 +97,8 @@ static int h264_redundant_pps_filter(AVBSFContext *bsf, AVPacket *pkt)
err = ff_cbs_delete_unit(ctx->input, au, i);
if (err < 0)
goto fail;
i--;
continue;
}
}
if (nal->type == H264_NAL_SLICE ||