diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-24 03:37:26 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-28 17:14:21 +0100 |
commit | 514ee8770d937ffba8902386edc77d315408c536 (patch) | |
tree | f89962f6bf02c8f6502c2347a603e3b98a8fd589 /libavutil | |
parent | 13e98f1dafd58b1703256ead6bc47858ce127a7f (diff) | |
download | ffmpeg-514ee8770d937ffba8902386edc77d315408c536.tar.gz |
avutil/spherical: Use av_strstart instead of strncmp
It makes the intent clearer and avoids calculating the length
separately.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/spherical.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/spherical.c b/libavutil/spherical.c index 4a7f3e49ca..ed66344a2f 100644 --- a/libavutil/spherical.c +++ b/libavutil/spherical.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "avstring.h" #include "mem.h" #include "spherical.h" @@ -70,8 +71,7 @@ int av_spherical_from_name(const char *name) int i; for (i = 0; i < FF_ARRAY_ELEMS(spherical_projection_names); i++) { - size_t len = strlen(spherical_projection_names[i]); - if (!strncmp(spherical_projection_names[i], name, len)) + if (av_strstart(name, spherical_projection_names[i], NULL)) return i; } |