[vlc-commits] vlc-thumb: bugfixes suggested by courmisch

Rafaël Carré git at videolan.org
Mon May 16 21:45:11 CEST 2011


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Mon May 16 15:44:47 2011 -0400| [a1967050f02676cd1ff69a4d70ec95eb5cf60ece] | committer: Rafaël Carré

vlc-thumb: bugfixes suggested by courmisch

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

 doc/libvlc/vlc-thumb.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/doc/libvlc/vlc-thumb.c b/doc/libvlc/vlc-thumb.c
index a4d870f..c373f99 100644
--- a/doc/libvlc/vlc-thumb.c
+++ b/doc/libvlc/vlc-thumb.c
@@ -56,7 +56,8 @@ static void cmdline(int argc, const char **argv, const char **in,
 
     *in  = argv[idx++];
     *out = strdup(argv[idx++]);
-    assert(*out);
+    if (!*out)
+        abort();
 
     len = strlen(*out);
     if (len >= 4 && !strcmp(*out + len - 4, ".png")) {
@@ -69,7 +70,8 @@ static void cmdline(int argc, const char **argv, const char **in,
      * and nautilus doesn't give filenames ending in .png */
 
     *out_with_ext = malloc(len + sizeof ".png");
-    assert(*out_with_ext);
+    if (!*out_with_ext)
+        abort();
     strcpy(*out_with_ext, *out);
     strcat(*out_with_ext, ".png");
 }
@@ -86,7 +88,7 @@ static libvlc_instance_t *create_libvlc(void)
         "--no-inhibit",                     /* we don't want interfaces       */
         "--no-disable-screensaver",         /* we don't want interfaces       */
         "--no-snapshot-preview",            /* no blending in dummy vout      */
-#if 1
+#ifndef NDEBUG
         "--verbose=2",                      /* full log                       */
 #endif
     };
@@ -167,7 +169,7 @@ int main(int argc, const char **argv)
     libvlc_media_t *m;
 
     /* mandatory to support UTF-8 filenames (provided the locale is well set)*/
-    setlocale(LC_ALL, getenv("LANG"));
+    setlocale(LC_ALL, "");
 
     cmdline(argc, argv, &in, &out, &out_with_ext, &width);
 



More information about the vlc-commits mailing list