You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/cbs_mpeg2: Use smaller scope for variables
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -144,10 +144,8 @@ static int cbs_mpeg2_split_fragment(CodedBitstreamContext *ctx,
|
|||||||
CodedBitstreamFragment *frag,
|
CodedBitstreamFragment *frag,
|
||||||
int header)
|
int header)
|
||||||
{
|
{
|
||||||
const uint8_t *start, *end;
|
const uint8_t *start;
|
||||||
CodedBitstreamUnitType unit_type;
|
|
||||||
uint32_t start_code = -1;
|
uint32_t start_code = -1;
|
||||||
size_t unit_size;
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
start = avpriv_find_start_code(frag->data, frag->data + frag->data_size,
|
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 {
|
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()
|
// Reset start_code to ensure that avpriv_find_start_code()
|
||||||
// really reads a new start code and does not reuse the old
|
// really reads a new start code and does not reuse the old
|
||||||
|
Reference in New Issue
Block a user