ffmpeg | branch: master | Andreas Rheinhardt <[email protected]> | 
Thu Jun 20 01:45:04 2019 +0200| [9362f1a982682ebddfd477f8562c4065bb531333] | 
committer: Mark Thompson

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 <[email protected]>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9362f1a982682ebddfd477f8562c4065bb531333
---

 libavcodec/h264_redundant_pps_bsf.c | 2 ++
 1 file changed, 2 insertions(+)

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 ||

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to