[vlc-commits] libvlc_media_new_path: set more meaningful error message (fixes #10792)
Rémi Denis-Courmont
git at videolan.org
Wed Feb 26 17:24:59 CET 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 26 18:24:10 2014 +0200| [345afa864d4107a1e3bdabb044994df2004185a2] | committer: Rémi Denis-Courmont
libvlc_media_new_path: set more meaningful error message (fixes #10792)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=345afa864d4107a1e3bdabb044994df2004185a2
---
lib/media.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/media.c b/lib/media.c
index ef845cd..af70b4a 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -26,6 +26,7 @@
#endif
#include <assert.h>
+#include <errno.h>
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
@@ -355,7 +356,7 @@ libvlc_media_t *libvlc_media_new_path( libvlc_instance_t *p_instance,
char *mrl = vlc_path2uri( path, NULL );
if( unlikely(mrl == NULL) )
{
- libvlc_printerr( "Not enough memory" );
+ libvlc_printerr( "%s", vlc_strerror_c(errno) );
return NULL;
}
More information about the vlc-commits
mailing list