summaryrefslogtreecommitdiff
path: root/libavcodec/cbs_mpeg2.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-02-04 16:04:02 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-02-08 07:11:14 +0100
commit67e1013a961e2f5dad467dd874d15819788080c0 (patch)
tree8a1b473418da6a768eaca655f7128687903d5a4b /libavcodec/cbs_mpeg2.c
parent70a90fb73e43d8c2d7f09ce6df3a861e65ac6b62 (diff)
avcodec/cbs_mpeg2: Use smaller scope for variables
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/cbs_mpeg2.c')
-rw-r--r--libavcodec/cbs_mpeg2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/cbs_mpeg2.c b/libavcodec/cbs_mpeg2.c
index e034d4cd3f..33bd3e0998 100644
--- a/libavcodec/cbs_mpeg2.c
+++ b/libavcodec/cbs_mpeg2.c
@@ -144,10 +144,8 @@ static int cbs_mpeg2_split_fragment(CodedBitstreamContext *ctx,
CodedBitstreamFragment *frag,
int header)
{
- const uint8_t *start, *end;
- CodedBitstreamUnitType unit_type;
+ const uint8_t *start;
uint32_t start_code = -1;
- size_t unit_size;
int err;
start = avpriv_find_start_code(frag->data, frag->data + frag->data_size,
@@ -158,7 +156,9 @@ static int cbs_mpeg2_split_fragment(CodedBitstreamContext *ctx,
}
do {
- unit_type = start_code & 0xff;
+ CodedBitstreamUnitType unit_type = start_code & 0xff;
+ const uint8_t *end;
+ size_t unit_size;
// Reset start_code to ensure that avpriv_find_start_code()
// really reads a new start code and does not reuse the old