summaryrefslogtreecommitdiff
path: root/src/cpl.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-08-11 22:52:47 +0100
committerCarl Hetherington <cth@carlh.net>2012-08-11 22:52:47 +0100
commitbc09fbc79580f56c93e35de25230af18b30e0e1e (patch)
tree8e640910c78d04b4e234668c7d8c7f1feac60873 /src/cpl.cc
parent2cd9086c95686117ffbce92188d50d525ed488bb (diff)
Access sound asset sampling rate, channels; access sound asset from DCP; fix bad cast to float.
Diffstat (limited to 'src/cpl.cc')
-rw-r--r--src/cpl.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index a95218d6..9dfe446d 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -65,8 +65,12 @@ MainPicture::MainPicture (xmlpp::Node const * node)
} catch (XMLError& e) {
/* Maybe it's not a fraction */
}
- float f = float_node ("ScreenAspectRatio");
- screen_aspect_ratio = Fraction (f * 1000, 1000);
+ try {
+ float f = float_node ("ScreenAspectRatio");
+ screen_aspect_ratio = Fraction (f * 1000, 1000);
+ } catch (bad_cast& e) {
+
+ }
ignore_node ("Hash");