From a721dac6012d33b3ab2650a7ead69d87a980bcc1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 23 Dec 2017 21:18:13 +0100 Subject: player: make track language matching case insensitive There is no reason not to do this, and probably saves the user some trouble. Mostly untested. Closes #5272. --- player/loadfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/loadfile.c') diff --git a/player/loadfile.c b/player/loadfile.c index ff401cd590..8139c06f3f 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -296,7 +296,7 @@ void add_demuxer_tracks(struct MPContext *mpctx, struct demuxer *demuxer) static int match_lang(char **langs, char *lang) { for (int idx = 0; langs && langs[idx]; idx++) { - if (lang && strcmp(langs[idx], lang) == 0) + if (lang && strcasecmp(langs[idx], lang) == 0) return INT_MAX - idx; } return 0; -- cgit v1.2.3