[FFmpeg-devel] [PATCH v2 10/13] cbs_mpeg2.c: use a while loop with a loop condition instead of an infinite loop

Scott Theisen scott.the.elm at gmail.com
Sat Feb 5 06:09:20 EET 2022


On 2/4/22 23:06, Andreas Rheinhardt wrote:
> Scott Theisen:
>> On 2/4/22 20:48, Andreas Rheinhardt wrote:
>>> I disagree that this enhances clarity: When using a counter, a for loop
>>> is the most natural.
>> The counter is not used as the loop condition, so it is not natural.
>> Also, you removed the counter and made this a do while loop in your own
>> patch series.
> Yes, after the counter has been removed, using a for-loop stopped being
> natural.

It is not really a for-loop, though, since it has no loop condition and 
is thus an infinite loop that just happens to be abusing the for-loop 
syntax.

-Scott


More information about the ffmpeg-devel mailing list