[vlc-commits] npapi: don't return an error if string is empty

Daniel Amm git at videolan.org
Sat Jun 13 18:09:08 CEST 2015


npapi-vlc | branch: master | Daniel Amm <da2424 at t-online.de> | Mon Jun  8 19:22:10 2015 +0200| [c3909b946c9a209e42cffed89f1ff059915520cd] | committer: Jean-Baptiste Kempf

npapi: don't return an error if string is empty

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 npapi/npruntime/npolibvlc.cpp |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/npapi/npruntime/npolibvlc.cpp b/npapi/npruntime/npolibvlc.cpp
index 246fac3..d6f60f3 100644
--- a/npapi/npruntime/npolibvlc.cpp
+++ b/npapi/npruntime/npolibvlc.cpp
@@ -1341,11 +1341,7 @@ LibvlcVideoNPObject::getProperty(int index, npapi::OutVariant& result)
             }
             case ID_video_aspectratio:
             {
-                auto ar = mp.aspectRatio();
-                if( ar.empty() )
-                    return INVOKERESULT_GENERIC_ERROR;
-
-                result = ar;
+                result = mp.aspectRatio();
                 return INVOKERESULT_NO_ERROR;
             }
             case ID_video_subtitle:
@@ -1355,11 +1351,7 @@ LibvlcVideoNPObject::getProperty(int index, npapi::OutVariant& result)
             }
             case ID_video_crop:
             {
-                auto geo = mp.cropGeometry();
-                if( geo.empty() )
-                    return INVOKERESULT_GENERIC_ERROR;
-
-                result = geo;
+                result = mp.cropGeometry();
                 return INVOKERESULT_NO_ERROR;
             }
             case ID_video_teletext:
@@ -1592,8 +1584,7 @@ LibvlcMarqueeNPObject::getProperty(int index, npapi::OutVariant& result)
         return INVOKERESULT_NO_ERROR;
 
     case ID_marquee_text:
-        auto marquee = mp.marqueeString( libvlc_marquee_Text );
-        result = marquee;
+        result = mp.marqueeString( libvlc_marquee_Text );
         return INVOKERESULT_NO_ERROR;
     }
     return INVOKERESULT_GENERIC_ERROR;



More information about the vlc-commits mailing list