ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Sat Feb 26 20:43:59 2022 -0300| [7a4840a8cabccd1ae000ae2e41d62d45cb95f68d] | committer: James Almer
avformat/av1: reduce the scope of some variables Signed-off-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a4840a8cabccd1ae000ae2e41d62d45cb95f68d --- libavformat/av1.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libavformat/av1.c b/libavformat/av1.c index 7771c09b4a..7caea0c377 100644 --- a/libavformat/av1.c +++ b/libavformat/av1.c @@ -33,8 +33,7 @@ static int av1_filter_obus(AVIOContext *pb, const uint8_t *buf, int size, int *offset) { const uint8_t *start = buf, *end = buf + size; - int64_t obu_size; - int off, start_pos, type, temporal_id, spatial_id; + int off; enum { START_NOT_FOUND, START_FOUND, @@ -44,6 +43,8 @@ static int av1_filter_obus(AVIOContext *pb, const uint8_t *buf, off = size = 0; while (buf < end) { + int64_t obu_size; + int start_pos, type, temporal_id, spatial_id; int len = parse_obu_header(buf, end - buf, &obu_size, &start_pos, &type, &temporal_id, &spatial_id); if (len < 0) @@ -333,8 +334,6 @@ static int parse_sequence_header(AV1SequenceParameters *seq_params, const uint8_ int ff_av1_parse_seq_header(AV1SequenceParameters *seq, const uint8_t *buf, int size) { - int64_t obu_size; - int start_pos, type, temporal_id, spatial_id; int is_av1c; if (size <= 0) @@ -373,6 +372,8 @@ int ff_av1_parse_seq_header(AV1SequenceParameters *seq, const uint8_t *buf, int } while (size > 0) { + int64_t obu_size; + int start_pos, type, temporal_id, spatial_id; int len = parse_obu_header(buf, size, &obu_size, &start_pos, &type, &temporal_id, &spatial_id); if (len < 0) @@ -401,8 +402,6 @@ int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size) PutBitContext pbc; uint8_t header[4], *meta; const uint8_t *seq; - int64_t obu_size; - int start_pos, type, temporal_id, spatial_id; int ret, nb_seq = 0, seq_size, meta_size; if (size <= 0) @@ -427,6 +426,8 @@ int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size) return ret; while (size > 0) { + int64_t obu_size; + int start_pos, type, temporal_id, spatial_id; int len = parse_obu_header(buf, size, &obu_size, &start_pos, &type, &temporal_id, &spatial_id); if (len < 0) { _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".