Re: [FFmpeg-devel] [PATCH 1/7] avcodec/cbs_mpeg2: Remove redundant counter

2022-02-06 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Use -1 as the position in ff_cbs_insert_unit_data() > which implicitly reuses frag->nb_units as the counter. > > Also switch to a do-while-loop, as it is more natural > than a for-loop now that the counter is gone. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/c

[FFmpeg-devel] [PATCH 1/7] avcodec/cbs_mpeg2: Remove redundant counter

2022-02-04 Thread Andreas Rheinhardt
Use -1 as the position in ff_cbs_insert_unit_data() which implicitly reuses frag->nb_units as the counter. Also switch to a do-while-loop, as it is more natural than a for-loop now that the counter is gone. Signed-off-by: Andreas Rheinhardt --- libavcodec/cbs_mpeg2.c | 12 +--- 1 file c