summaryrefslogtreecommitdiff
path: root/src/sound_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-12-09 13:12:21 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:22 +0100
commit0b39df958f534068950669a763be7b4602740107 (patch)
tree9427106257d4309fc858a94d3c40055d0140fb89 /src/sound_asset.cc
parent66f5e0b713f4ae4066e92ff741d5d71f827a1c37 (diff)
Store sound asset language as a string, but set it as a
dcp::LanguageTag. This makes it work the same as other language tags, and tolerates bad values while trying not to allow them to be created.
Diffstat (limited to 'src/sound_asset.cc')
-rw-r--r--src/sound_asset.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sound_asset.cc b/src/sound_asset.cc
index 618574b6..ea44e806 100644
--- a/src/sound_asset.cc
+++ b/src/sound_asset.cc
@@ -98,7 +98,7 @@ SoundAsset::SoundAsset (boost::filesystem::path file)
if (!soundfield->RFC5646SpokenLanguage.empty()) {
char buffer[64];
soundfield->RFC5646SpokenLanguage.get().EncodeString(buffer, sizeof(buffer));
- _language = dcp::LanguageTag (buffer);
+ _language = buffer;
}
}
@@ -111,7 +111,7 @@ SoundAsset::SoundAsset (Fraction edit_rate, int sampling_rate, int channels, Lan
, _intrinsic_duration (0)
, _channels (channels)
, _sampling_rate (sampling_rate)
- , _language (language)
+ , _language (language.to_string())
{
}