[FFmpeg-cvslog] avutil/csp: eliminate redundant branch
Niklas Haas
git at videolan.org
Thu Dec 5 13:28:49 EET 2024
ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Mon Nov 25 13:07:35 2024 +0100| [feb5982f435fe9d86775ba430a489120a8a90226] | committer: Niklas Haas
avutil/csp: eliminate redundant branch
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=feb5982f435fe9d86775ba430a489120a8a90226
---
libavutil/csp.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libavutil/csp.c b/libavutil/csp.c
index 7ef822c60b..3dd7bc2562 100644
--- a/libavutil/csp.c
+++ b/libavutil/csp.c
@@ -290,11 +290,7 @@ static const av_csp_trc_function trc_funcs[AVCOL_TRC_NB] = {
av_csp_trc_function av_csp_trc_func_from_id(enum AVColorTransferCharacteristic trc)
{
- av_csp_trc_function func;
if (trc >= AVCOL_TRC_NB)
return NULL;
- func = trc_funcs[trc];
- if (!func)
- return NULL;
- return func;
+ return trc_funcs[trc];
}
More information about the ffmpeg-cvslog
mailing list