[FFmpeg-cvslog] avcodec/h2645_parse: fix nal size

Michael Niedermayer git at videolan.org
Sat Aug 20 01:59:37 EEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Aug 19 23:54:28 2016 +0200| [15dd56c093be480e719d7bbc39f8dbddb586694d] | committer: Michael Niedermayer

avcodec/h2645_parse: fix nal size

Found-by: <durandal_1707>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/h2645_parse.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index 0059437..c3961a5 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -88,7 +88,8 @@ int ff_h2645_extract_rbsp(const uint8_t *src, int length,
         nal->size     =
         nal->raw_size = length;
         return length;
-    }
+    } else if (i > length)
+        i = length;
 
     av_fast_padded_malloc(&nal->rbsp_buffer, &nal->rbsp_buffer_size,
                           length + padding);



More information about the ffmpeg-cvslog mailing list