[FFmpeg-devel] [PATCH 10/36] avcodec/vp9_superframe_split_bsf: Use unchecked bytestream reader

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Sat May 30 19:05:15 EEST 2020


It has already been checked that there is enough data available.

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

diff --git a/libavcodec/vp9_superframe_split_bsf.c b/libavcodec/vp9_superframe_split_bsf.c
index 48c3723206..9f9e495bd5 100644
--- a/libavcodec/vp9_superframe_split_bsf.c
+++ b/libavcodec/vp9_superframe_split_bsf.c
@@ -72,7 +72,7 @@ static int vp9_superframe_split_filter(AVBSFContext *ctx, AVPacket *out)
                 for (i = 0; i < nb_frames; i++) {
                     unsigned frame_size = 0;
                     for (j = 0; j < length_size; j++)
-                        frame_size |= bytestream2_get_byte(&bc) << (j * 8);
+                        frame_size |= bytestream2_get_byteu(&bc) << (j * 8);
 
                     total_size += frame_size;
                     if (!frame_size || total_size > in->size - idx_size) {
-- 
2.20.1



More information about the ffmpeg-devel mailing list