Message ID | 20190617034223.21195-14-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Headers | show |
diff --git a/libavcodec/h264_redundant_pps_bsf.c b/libavcodec/h264_redundant_pps_bsf.c index f8b0f9ac0a..8405738c4b 100644 --- a/libavcodec/h264_redundant_pps_bsf.c +++ b/libavcodec/h264_redundant_pps_bsf.c @@ -95,6 +95,8 @@ static int h264_redundant_pps_filter(AVBSFContext *bsf, AVPacket *pkt) av_log(bsf, AV_LOG_VERBOSE, "Deleting redundant PPS " "at %"PRId64".\n", pkt->pts); ff_cbs_delete_unit(ctx->input, au, i); + i--; + continue; } } if (nal->type == H264_NAL_SLICE ||
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> --- libavcodec/h264_redundant_pps_bsf.c | 2 ++ 1 file changed, 2 insertions(+)