npapi-vlc | branch: master | Ludovic Fauvet <[email protected]> | Wed Jan 2
17:16:00 2013 +0100| [d503f31619561ff14e000268211a3d5d2d86757c] | committer:
Ludovic Fauvet
Consider an empty boolean option as true
This ensures compatibility with the following example:
<video width="320" height="240" controls>
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=d503f31619561ff14e000268211a3d5d2d86757c
---
npapi/vlcplugin_base.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/npapi/vlcplugin_base.cpp b/npapi/vlcplugin_base.cpp
index 9fd1567..ba0b872 100644
--- a/npapi/vlcplugin_base.cpp
+++ b/npapi/vlcplugin_base.cpp
@@ -59,7 +59,8 @@ VlcPluginBase::VlcPluginBase( NPP instance, NPuint16_t mode )
:
}
static bool boolValue(const char *value) {
- return ( !strcmp(value, "1") ||
+ return ( *value == NULL ||
+ !strcmp(value, "1") ||
!strcasecmp(value, "true") ||
!strcasecmp(value, "yes") );
}
_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits