[FFmpeg-devel] [PATCH] avformat/dvdvideodec: remove `if ((ret = ...) < 0)` pattern

Stefano Sabatini stefasab at gmail.com
Wed Mar 27 13:27:24 EET 2024


On date Tuesday 2024-03-26 15:17:49 -0500, Marth64 wrote:
> Recent advice plus my own experience agree that this pattern
> is error-prone. Instead, set `ret` in its own line and do
> the error validation after. Also, explicitly return 0 on success
> in dvdvideo_chapters_setup_preindex()

Not super convinced this is really useful (it's increasing the line
count and therefore decreasing readability), but will apply.


More information about the ffmpeg-devel mailing list