[FFmpeg-devel] [PATCH 10/36] avcodec/vp9_superframe_split_bsf: Use unchecked bytestream reader

Anton Khirnov anton at khirnov.net
Mon Jun 1 12:33:41 EEST 2020


Quoting Andreas Rheinhardt (2020-05-30 18:05:15)
> It has already been checked that there is enough data available.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---

I don't see how this improves things. The only advantage of unchecked
reads is performance, but I don't think that is relevant here.
Otherwise, it just adds a non-obvious dependency on the check being
there and being correct (not to mention cluttering history).

IMO unchecked reads should be used ONLY when there are important
performance reasons to use them, otherwise checked reads should be used
even if they are not strictly necessary.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list