Commit 67e1013a authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avcodec/cbs_mpeg2: Use smaller scope for variables

Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent 70a90fb7
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment