[FFmpeg-devel] [PATCH] New API usage example (reading, converting, encoding and muxing an audio file)

Anton Khirnov anton at khirnov.net
Tue Jun 7 12:42:43 EEST 2022


Quoting Paolo Prete (2022-06-06 19:40:42)
> Hello,
> From what I see, the doc/examples files can be still improved. More
> precisely, their main() is often split into functions with short names
> that hide important (sometime essential) details of what they're doing
> and they worsen the readability, by forcing the user to jump from
> chunks to chunks of the code.

I disagree VERY strongly.

Long functions are extremely hard to reason about, because of all the
pieces you have to keep in your head at once. Grouping logically related
blocks of code into their own small functions that can be thought of as
a single unit immensely improves readability and maintainability.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list