diff --git a/libavcodec/h264_redundant_pps_bsf.c b/libavcodec/h264_redundant_pps_bsf.c index 80b8634c7b..907e95b9c8 100644 --- a/libavcodec/h264_redundant_pps_bsf.c +++ b/libavcodec/h264_redundant_pps_bsf.c @@ -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 ||