You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/cbs: Avoid branch
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -783,15 +783,13 @@ static int cbs_insert_unit(CodedBitstreamFragment *frag,
|
||||
if (position < frag->nb_units)
|
||||
memcpy(units + position + 1, frag->units + position,
|
||||
(frag->nb_units - position) * sizeof(*units));
|
||||
}
|
||||
|
||||
memset(units + position, 0, sizeof(*units));
|
||||
|
||||
if (units != frag->units) {
|
||||
av_free(frag->units);
|
||||
frag->units = units;
|
||||
}
|
||||
|
||||
memset(units + position, 0, sizeof(*units));
|
||||
|
||||
++frag->nb_units;
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user