[vlc-commits] ActiveX: use float for position event

Jean-Baptiste Kempf git at videolan.org
Sun Dec 14 20:56:48 CET 2014


npapi-vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Dec 14 20:55:57 2014 +0100| [4714a75c08eee85046efb5d482a22568d2332cc6] | committer: Jean-Baptiste Kempf

ActiveX: use float for position event

Ref #11485

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=4714a75c08eee85046efb5d482a22568d2332cc6
---

 activex/axvlc.idl  |    2 +-
 activex/plugin.cpp |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/activex/axvlc.idl b/activex/axvlc.idl
index 7bc4478..145e9ae 100644
--- a/activex/axvlc.idl
+++ b/activex/axvlc.idl
@@ -226,7 +226,7 @@ library AXVLC
             [id(DISPID_MediaPlayerTimeChangedEvent), helpstring("Time changed")]
             void MediaPlayerTimeChanged([in] long time);
             [id(DISPID_MediaPlayerPositionChangedEvent), helpstring("Position changed")]
-            void MediaPlayerPositionChanged([in] long position);
+            void MediaPlayerPositionChanged([in] float position);
             [id(DISPID_MediaPlayerSeekableChangedEvent), helpstring("Seek changed")]
             void MediaPlayerSeekableChanged([in] VARIANT_BOOL seekable);
             [id(DISPID_MediaPlayerPausableChangedEvent), helpstring("Pause setting changed")]
diff --git a/activex/plugin.cpp b/activex/plugin.cpp
index 7414943..07acfb4 100644
--- a/activex/plugin.cpp
+++ b/activex/plugin.cpp
@@ -1139,8 +1139,8 @@ void VLCPlugin::fireOnMediaPlayerPositionChangedEvent(float position)
     params.cArgs = 1;
     params.rgvarg = (VARIANTARG *) CoTaskMemAlloc(sizeof(VARIANTARG) * params.cArgs) ;
     memset(params.rgvarg, 0, sizeof(VARIANTARG) * params.cArgs);
-    params.rgvarg[0].vt = VT_I4;
-    params.rgvarg[0].lVal = static_cast<LONG>(position);
+    params.rgvarg[0].vt = VT_R4;
+    params.rgvarg[0].fltVal = position;
     params.rgdispidNamedArgs = NULL;
     params.cNamedArgs = 0;
     vlcConnectionPointContainer->fireEvent(DISPID_MediaPlayerPositionChangedEvent, &params);



More information about the vlc-commits mailing list