summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2020-06-03 08:22:19 -0600
committerJohn Stebbins <[email protected]>2020-06-03 08:22:19 -0600
commit769b48378969aa7cd927873804ab0ad4cb79e06e (patch)
tree145a2fd961f76e591093ab170fe1bd674afe348a /libhb
parentf17fdf98e9333d12fdd8c335db94985bdb935fb1 (diff)
muxavformat: fix setting iso639_2b lang code in mkv
An empty string was getting set for the mkv lang code. Need to test that the string is not NULL **and** not empty. Affects Hebrew, Indonesian, Javanese, and Yiddish. Fixes https://github.com/HandBrake/HandBrake/issues/2903
Diffstat (limited to 'libhb')
-rw-r--r--libhb/muxavformat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
index be5bf7b5d..6a11d866c 100644
--- a/libhb/muxavformat.c
+++ b/libhb/muxavformat.c
@@ -104,7 +104,8 @@ static char* lookup_lang_code(int mux, char *iso639_2)
// MKV lang codes should be ISO-639-2B if it exists,
// else ISO-639-2
lang = lang_for_code2( iso639_2 );
- out = lang->iso639_2b ? lang->iso639_2b : lang->iso639_2;
+ out = lang->iso639_2b && *lang->iso639_2b ? lang->iso639_2b :
+ lang->iso639_2;
break;
default:
break;