* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "avstring.h"
#include "mem.h"
#include "spherical.h"
*bottom = orig_height - height - *top;
}
-static const char *spherical_projection_names[] = {
+static const char *const spherical_projection_names[] = {
[AV_SPHERICAL_EQUIRECTANGULAR] = "equirectangular",
[AV_SPHERICAL_CUBEMAP] = "cubemap",
[AV_SPHERICAL_EQUIRECTANGULAR_TILE] = "tiled equirectangular",
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;
}