From 3196e5b7a52580bfa9242a35175e241db328a49f Mon Sep 17 00:00:00 2001 From: Minh Ngo Date: Mon, 7 Oct 2013 10:16:43 +0300 Subject: Avmedia/VLC: Returns "No error" if there aren't any error. Change-Id: Ic080cbcef56a82129347bbb4f008d1c36b0a927a --- avmedia/source/vlc/wrapper/Common.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'avmedia') diff --git a/avmedia/source/vlc/wrapper/Common.cxx b/avmedia/source/vlc/wrapper/Common.cxx index 1ed5256f1755..4c28b6df93ca 100644 --- a/avmedia/source/vlc/wrapper/Common.cxx +++ b/avmedia/source/vlc/wrapper/Common.cxx @@ -11,6 +11,8 @@ namespace { + const char AVMEDIA_NO_ERROR[] = "No error"; + const char* ( *libvlc_get_version ) (void); char * ( * libvlc_errmsg ) (void); } @@ -39,7 +41,8 @@ const char* Common::Version() const char* Common::LastErrorMessage() { - return libvlc_errmsg(); + const char *errorMsg = libvlc_errmsg(); + return errorMsg == NULL ? AVMEDIA_NO_ERROR : errorMsg; } } } -- cgit