aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-06-20 01:45:04 +0200
committerMark Thompson <sw@jkqxz.net>2019-07-07 22:59:16 +0100
commit9362f1a982682ebddfd477f8562c4065bb531333 (patch)
treef86f47b58558cfe448493ac5877f173e0cdb1e19
parentd78553cc4c791d0e276b37e1f2687301b02ea4a7 (diff)
downloadffmpeg-9362f1a982682ebddfd477f8562c4065bb531333.tar.gz
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>
-rw-r--r--libavcodec/h264_redundant_pps_bsf.c2
1 files changed, 2 insertions, 0 deletions
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 ||