aboutsummaryrefslogtreecommitdiffstats
path: root/src/tvtimeconf.c
diff options
context:
space:
mode:
authorbatchall <devnull@localhost>2004-08-29 18:51:56 +0000
committerbatchall <devnull@localhost>2004-08-29 18:51:56 +0000
commit81f770f0ea0a4037f64382c60584725d9cbb4239 (patch)
tree491289147c5a455586713b4a113cd584e019ca68 /src/tvtimeconf.c
parent613d4bd2ee52bf6cfebac402002d3532d8d331b4 (diff)
29 Aug 2004 Achim Schneider <batchall@mordor.ch>
* tvtime/src/tvtimeconf.c: Parse NaN's to default values
Diffstat (limited to 'src/tvtimeconf.c')
-rw-r--r--src/tvtimeconf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tvtimeconf.c b/src/tvtimeconf.c
index 732a23e..b8d126a 100644
--- a/src/tvtimeconf.c
+++ b/src/tvtimeconf.c
@@ -32,6 +32,7 @@
#include <pwd.h>
#include <errno.h>
#include <libxml/parser.h>
+#include <math.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -286,6 +287,9 @@ static void parse_option( config_t *ct, xmlNodePtr node )
if( !xmlStrcasecmp( name, BAD_CAST "LumaCorrection" ) ) {
ct->luma_correction = atof( curval );
+ if( !isnormal( ct->luma_correction ) ) {
+ ct->luma_correction = 1.0;
+ }
}
if( !xmlStrcasecmp( name, BAD_CAST "V4LDevice" ) ) {
@@ -379,6 +383,9 @@ static void parse_option( config_t *ct, xmlNodePtr node )
if( !xmlStrcasecmp( name, BAD_CAST "Overscan" ) ) {
ct->overscan = ( atof( curval ) / 2.0 ) / 100.0;
+ if( !isnormal( ct->overscan ) ) {
+ ct->overscan = 0.0;
+ }
}
if( !xmlStrcasecmp( name, BAD_CAST "MixerDevice" ) ) {

Privacy Policy