diff mbox series

[FFmpeg-devel,6/8] avcodec/cbs_sei: Don't use -1th element of array

Message ID 20210310010601.1142819-6-andreas.rheinhardt@gmail.com
State Accepted
Commit 12a9f3fc09c7f0ded8be76d66542a88d293663cc
Headers show
Series [FFmpeg-devel,1/8] avcodec/cbs: Remove redundant checks for CodedBitstreamContext.codec | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt March 10, 2021, 1:05 a.m. UTC
(This affected only suffix SEI messages; yet no such SEI messages are
currently inserted.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/cbs_sei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/cbs_sei.c b/libavcodec/cbs_sei.c
index c49830ad77..2a96db9674 100644
--- a/libavcodec/cbs_sei.c
+++ b/libavcodec/cbs_sei.c
@@ -166,7 +166,7 @@  static int cbs_sei_get_unit(CodedBitstreamContext *ctx,
         }
         if (i < 0) {
             // No VCL units; just put it at the end.
-            position = -1;
+            position = au->nb_units;
         } else {
             position = i + 1;
         }