It makes the intent clearer and avoids calculating the length separately. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> --- libavutil/stereo3d.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavutil/stereo3d.c b/libavutil/stereo3d.c index 6edcdb1796..279fcc1ff3 100644 --- a/libavutil/stereo3d.c +++ b/libavutil/stereo3d.c @@ -18,9 +18,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <stdint.h> #include <string.h> +#include "avstring.h" #include "common.h" #include "mem.h" #include "stereo3d.h" @@ -67,8 +67,7 @@ int av_stereo3d_from_name(const char *name) int i; for (i = 0; i < FF_ARRAY_ELEMS(stereo3d_type_names); i++) { - size_t len = strlen(stereo3d_type_names[i]); - if (!strncmp(stereo3d_type_names[i], name, len)) + if (av_strstart(name, stereo3d_type_names[i], NULL)) return i; } -- 2.27.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".